summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/pps.c
diff options
context:
space:
mode:
authorpiso <piso@FreeBSD.org>2007-02-23 12:19:07 +0000
committerpiso <piso@FreeBSD.org>2007-02-23 12:19:07 +0000
commit6a2ffa86e5b748ba71e36d37462a936eb9101be7 (patch)
tree10833d4edb6c0d0a5efcf7762d842a4c378404b0 /sys/dev/ppbus/pps.c
parent7b48c9d78377cdb9fc6e8bcc5406e28819aef6e3 (diff)
downloadFreeBSD-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/ppbus/pps.c')
-rw-r--r--sys/dev/ppbus/pps.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
index 37c785e..e491ed2 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
OpenPOWER on IntegriCloud