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/ppbus | |
| parent | 68cb8659050380e1245328796e2783f030c94974 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ppbus')
| -rw-r--r-- | sys/dev/ppbus/if_plip.c | 2 | ||||
| -rw-r--r-- | sys/dev/ppbus/lpt.c | 2 | ||||
| -rw-r--r-- | sys/dev/ppbus/ppbconf.c | 4 | ||||
| -rw-r--r-- | sys/dev/ppbus/pps.c | 9 |
4 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index 7d94eea42fbf..dfee00d2e919 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -358,7 +358,7 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) /* attach our interrupt handler, later detached when the bus is released */ if ((error = bus_setup_intr(dev, sc->res_irq, - INTR_TYPE_NET, lp_intr, dev, &ih))) { + INTR_TYPE_NET, NULL, lp_intr, dev, &ih))) { ppb_release_bus(ppbus, dev); return (error); } diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index e968aa572d15..1986d56dccb2 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -760,7 +760,7 @@ lptwrite(struct cdev *dev, struct uio *uio, int ioflag) if (sc->sc_irq & LP_USE_IRQ) { /* register our interrupt handler */ err = bus_setup_intr(lptdev, sc->intr_resource, - INTR_TYPE_TTY, lpt_intr, lptdev, + INTR_TYPE_TTY, NULL, lpt_intr, lptdev, &sc->intr_cookie); if (err) { device_printf(lptdev, "handler registration failed, polled mode.\n"); diff --git a/sys/dev/ppbus/ppbconf.c b/sys/dev/ppbus/ppbconf.c index 53421a22c29b..40851d608975 100644 --- a/sys/dev/ppbus/ppbconf.c +++ b/sys/dev/ppbus/ppbconf.c @@ -417,7 +417,7 @@ ppbus_detach(device_t dev) static int ppbus_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - void (*ihand)(void *), void *arg, void **cookiep) + driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep) { int error; struct ppb_data *ppb = DEVTOSOFTC(bus); @@ -428,7 +428,7 @@ ppbus_setup_intr(device_t bus, device_t child, struct resource *r, int flags, return (EINVAL); if ((error = BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - ihand, arg, cookiep))) + filt, ihand, arg, cookiep))) return (error); /* store the resource and the cookie for eventually forcing diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index 37c785e7527f..e491ed25093d 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -51,7 +51,7 @@ struct pps_data { void *intr_cookie; /* interrupt registration cookie */ }; -static void ppsintr(void *arg); +static int ppsintr(void *arg); static void ppshcpoll(void *arg); #define DEVTOSOFTC(dev) \ @@ -205,7 +205,7 @@ ppsopen(struct cdev *dev, int flags, int fmt, struct thread *td) /* attach the interrupt handler */ if ((error = bus_setup_intr(ppsdev, sc->intr_resource, - (INTR_TYPE_TTY | INTR_MPSAFE | INTR_FAST), ppsintr, + (INTR_TYPE_TTY | INTR_MPSAFE), ppsintr, NULL, sc, &sc->intr_cookie))) { ppb_release_bus(ppbus, ppsdev); return (error); @@ -276,14 +276,14 @@ ppshcpoll(void *arg) mtx_unlock_spin(&sc->mtx); } -static void +static int ppsintr(void *arg) { struct pps_data *sc = (struct pps_data *)arg; pps_capture(&sc->pps[0]); if (!(ppb_rstr(sc->ppbus) & nACK)) - return; + return (FILTER_STRAY); if (sc->pps[0].ppsparam.mode & PPS_ECHOASSERT) ppb_wctr(sc->ppbus, IRQENABLE | AUTOFEED); mtx_lock_spin(&sc->mtx); @@ -291,6 +291,7 @@ ppsintr(void *arg) mtx_unlock_spin(&sc->mtx); if (sc->pps[0].ppsparam.mode & PPS_ECHOASSERT) ppb_wctr(sc->ppbus, IRQENABLE); + return (FILTER_HANDLED); } static int |
