Summary: | Clearfog pro boot hang | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Priit Trees <trees> | ||||
Component: | arm | Assignee: | freebsd-arm (Nobody) <freebsd-arm> | ||||
Status: | Closed Works As Intended | ||||||
Severity: | Affects Many People | CC: | kd | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | arm | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Priit Trees
2022-09-27 13:23:18 UTC
Hi, I think I might know what is going on. Please try the patch below and let me know if it works. diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c index b29fc48e5422..040f0ea00f0e 100644 --- a/sys/dev/uart/uart_dev_snps.c +++ b/sys/dev/uart/uart_dev_snps.c @@ -216,7 +216,7 @@ snps_probe(device_t dev) device_printf(dev, "could not determine frequency\n"); error = uart_bus_probe(dev, (int)shift, (int)iowidth, (int)clock, 0, 0, UART_F_BUSY_DETECT); - if (error != 0) + if (error > 0) return (error); /* XXX uart_bus_probe has changed the softc, so refresh it */ @@ -227,7 +227,7 @@ snps_probe(device_t dev) sc->apb_pclk = apb_pclk; sc->reset = reset; - return (0); + return (BUS_PROBE_VENDOR); } static int Hi, Yes, The patch is worked. Thank you very much. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6bdc398832a60f94a2d895f64b5546eec3af2da8 commit 6bdc398832a60f94a2d895f64b5546eec3af2da8 Author: Kornel Dulęba <kd@FreeBSD.org> AuthorDate: 2022-10-06 14:25:47 +0000 Commit: Kornel Dulęba <kd@FreeBSD.org> CommitDate: 2022-10-06 14:42:51 +0000 uart_dev_snps: Fix device probing The "uart_bus_probe" function is used as a generic part of uart probe logic. It returns a driver priority(negative number) if successful and an error code otherwise. Fix the error checking condition to account for that. Also, while here return "BUS_PROBE_VENDOR", instead of "0". This fixes uart on clearfog pro with recent DT. PR: 266657 Reviewed by: mw Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D36880 sys/dev/uart/uart_dev_snps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) |