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/adlink | |
parent | 68cb8659050380e1245328796e2783f030c94974 (diff) | |
download | src-ef544f631226436ef590825881e7a28369df82f6.tar.gz src-ef544f631226436ef590825881e7a28369df82f6.zip |
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@
Notes
Notes:
svn path=/head/; revision=166901
Diffstat (limited to 'sys/dev/adlink')
-rw-r--r-- | sys/dev/adlink/adlink.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c index 75b55dc13ea7..1a669fcd8a03 100644 --- a/sys/dev/adlink/adlink.c +++ b/sys/dev/adlink/adlink.c @@ -115,7 +115,7 @@ struct softc { static d_ioctl_t adlink_ioctl; static d_mmap_t adlink_mmap; -static void adlink_intr(void *arg); +static int adlink_intr(void *arg); static struct cdevsw adlink_cdevsw = { .d_version = D_VERSION, @@ -124,7 +124,7 @@ static struct cdevsw adlink_cdevsw = { .d_name = "adlink", }; -static void +static int adlink_intr(void *arg) { struct softc *sc; @@ -134,7 +134,7 @@ adlink_intr(void *arg) sc = arg; u = bus_read_4(sc->res[0], 0x38); if (!(u & 0x00800000)) - return; + return; // XXX - FILTER_STRAY? bus_write_4(sc->res[0], 0x38, u | 0x003f4000); sc->sample += sc->p0->chunksize / 2; @@ -147,7 +147,7 @@ adlink_intr(void *arg) if (sc->p0->state != STATE_RUN) { printf("adlink: stopping %d\n", sc->p0->state); - return; + return; // XXX - FILTER_STRAY? } pg = pg->next; @@ -156,6 +156,7 @@ adlink_intr(void *arg) bus_write_4(sc->res[0], 0x24, pg->phys); bus_write_4(sc->res[0], 0x28, sc->p0->chunksize); wakeup(sc); + return (FILTER_HANDLED); } static int @@ -372,14 +373,15 @@ adlink_attach(device_t self) if (error) return (error); + /* XXX why do we need INTR_MPSAFE if INTR_FAST was declared too?!?!? */ i = bus_setup_intr(self, sc->res[2], - INTR_MPSAFE | INTR_TYPE_MISC | INTR_FAST, - adlink_intr, sc, &sc->intrhand); + INTR_MPSAFE | INTR_TYPE_MISC, + adlink_intr, NULL, sc, &sc->intrhand); if (i) { printf("adlink: Couldn't get FAST intr\n"); i = bus_setup_intr(self, sc->res[2], INTR_MPSAFE | INTR_TYPE_MISC, - adlink_intr, sc, &sc->intrhand); + NULL, (driver_intr_t *)adlink_intr, sc, &sc->intrhand); } if (i) { |