diff options
| author | Paolo Pisati <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
|---|---|---|
| committer | Paolo Pisati <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
| commit | ef544f631226436ef590825881e7a28369df82f6 (patch) | |
| tree | 10833d4edb6c0d0a5efcf7762d842a4c378404b0 /sys/dev/uart/uart_core.c | |
| parent | 68cb8659050380e1245328796e2783f030c94974 (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart/uart_core.c')
| -rw-r--r-- | sys/dev/uart/uart_core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 3c7c191b7443..07d87d097fc7 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -227,13 +227,14 @@ uart_intr_txidle(void *arg) return (0); } -static void +static int uart_intr(void *arg) { struct uart_softc *sc = arg; - int ipend; + int flag = 0, ipend; while (!sc->sc_leaving && (ipend = UART_IPEND(sc)) != 0) { + flag = 1; if (ipend & SER_INT_OVERRUN) uart_intr_overrun(sc); if (ipend & SER_INT_BREAK) @@ -243,8 +244,9 @@ uart_intr(void *arg) if (ipend & SER_INT_SIGCHG) uart_intr_sigchg(sc); if (ipend & SER_INT_TXIDLE) - uart_intr_txidle(sc); + uart_intr_txidle(sc); } + return((flag)?FILTER_HANDLED:FILTER_STRAY); } serdev_intr_t * @@ -401,12 +403,12 @@ uart_bus_attach(device_t dev) RF_ACTIVE | RF_SHAREABLE); if (sc->sc_ires != NULL) { error = bus_setup_intr(dev, - sc->sc_ires, INTR_TYPE_TTY | INTR_FAST, uart_intr, - sc, &sc->sc_icookie); + sc->sc_ires, INTR_TYPE_TTY, + uart_intr, NULL, sc, &sc->sc_icookie); if (error) error = bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_TTY | INTR_MPSAFE, - uart_intr, sc, &sc->sc_icookie); + NULL, (driver_intr_t *)uart_intr, sc, &sc->sc_icookie); else sc->sc_fastintr = 1; |
