[PATCH] uart_core: start countdown for non-interrupt mode
Aleksey Kuleshov
rndfax at yandex.ru
Wed Jul 8 19:21:49 UTC 2015
The uart_intr will never be called if interrupts are not available.
Start counter with callout_reset call.
---
sys/dev/uart/uart_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c
index bbb06ff..c1b64ba 100644
--- a/sys/dev/uart/uart_core.c
+++ b/sys/dev/uart/uart_core.c
@@ -540,6 +540,8 @@ uart_bus_attach(device_t dev)
/* No interrupt resource. Force polled mode. */
sc->sc_polled = 1;
callout_init(&sc->sc_timer, 1);
+ callout_reset(&sc->sc_timer, hz / uart_poll_freq,
+ (timeout_t *)uart_intr, sc);
}
if (bootverbose && (sc->sc_fastintr || sc->sc_polled)) {
--
2.4.5
More information about the freebsd-current
mailing list