diff options
author | piso <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
---|---|---|
committer | piso <piso@FreeBSD.org> | 2007-02-23 12:19:07 +0000 |
commit | 6a2ffa86e5b748ba71e36d37462a936eb9101be7 (patch) | |
tree | 10833d4edb6c0d0a5efcf7762d842a4c378404b0 /sys/dev/uart/uart_core.c | |
parent | 7b48c9d78377cdb9fc6e8bcc5406e28819aef6e3 (diff) | |
download | FreeBSD-src-6a2ffa86e5b748ba71e36d37462a936eb9101be7.zip FreeBSD-src-6a2ffa86e5b748ba71e36d37462a936eb9101be7.tar.gz |
o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many
Approved by: re@
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 3c7c191..07d87d0 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; |