summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
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/sound
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/sound')
-rw-r--r--sys/dev/sound/isa/gusc.c10
-rw-r--r--sys/dev/sound/isa/sbc.c12
-rw-r--r--sys/dev/sound/pci/csa.c10
-rw-r--r--sys/dev/sound/pci/emu10kx.c2
-rw-r--r--sys/dev/sound/pci/vibes.c2
-rw-r--r--sys/dev/sound/pcm/sound.c2
6 files changed, 26 insertions, 12 deletions
diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c
index 36adec4..27aa649 100644
--- a/sys/dev/sound/isa/gusc.c
+++ b/sys/dev/sound/isa/gusc.c
@@ -316,7 +316,7 @@ gusc_attach(device_t dev)
}
if (scp->irq != NULL)
- bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, gusc_intr, scp, &ih);
+ bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, NULL, gusc_intr, scp, &ih);
bus_generic_attach(dev);
return (0);
@@ -419,11 +419,15 @@ gusc_release_resource(device_t bus, device_t child, int type, int rid,
static int
gusc_setup_intr(device_t dev, device_t child, struct resource *irq,
- int flags, driver_intr_t *intr, void *arg, void **cookiep)
+ int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep)
{
sc_p scp = (sc_p)device_get_softc(dev);
devclass_t devclass;
+ if (filter != NULL) {
+ printf("gusc.c: we cannot use a filter here\n");
+ return (EINVAL);
+ }
devclass = device_get_devclass(child);
if (strcmp(devclass_get_name(devclass), "midi") == 0) {
scp->midi_intr.intr = intr;
@@ -434,7 +438,7 @@ gusc_setup_intr(device_t dev, device_t child, struct resource *irq,
scp->pcm_intr.arg = arg;
return 0;
}
- return bus_generic_setup_intr(dev, child, irq, flags, intr,
+ return bus_generic_setup_intr(dev, child, irq, flags, filter, intr,
arg, cookiep);
}
diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c
index c311ed7..d8787a1 100644
--- a/sys/dev/sound/isa/sbc.c
+++ b/sys/dev/sound/isa/sbc.c
@@ -80,8 +80,8 @@ static struct resource *sbc_alloc_resource(device_t bus, device_t child, int typ
static int sbc_release_resource(device_t bus, device_t child, int type, int rid,
struct resource *r);
static int sbc_setup_intr(device_t dev, device_t child, struct resource *irq,
- int flags, driver_intr_t *intr, void *arg,
- void **cookiep);
+ int flags, driver_filter_t *filter, driver_intr_t *intr,
+ void *arg, void **cookiep);
static int sbc_teardown_intr(device_t dev, device_t child, struct resource *irq,
void *cookie);
@@ -503,13 +503,17 @@ sbc_intr(void *p)
static int
sbc_setup_intr(device_t dev, device_t child, struct resource *irq,
- int flags, driver_intr_t *intr, void *arg,
- void **cookiep)
+ int flags, driver_filter_t *filter, driver_intr_t *intr,
+ void *arg, void **cookiep)
{
struct sbc_softc *scp = device_get_softc(dev);
struct sbc_ihl *ihl = NULL;
int i, ret;
+ if (filter != NULL) {
+ printf("sbc.c: we cannot use a filter here\n");
+ return (EINVAL);
+ }
sbc_lock(scp);
i = 0;
while (i < IRQ_MAX) {
diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c
index 1e38295..ee3e33e 100644
--- a/sys/dev/sound/pci/csa.c
+++ b/sys/dev/sound/pci/csa.c
@@ -82,7 +82,8 @@ static int csa_release_resource(device_t bus, device_t child, int type, int rid,
struct resource *r);
static int csa_setup_intr(device_t bus, device_t child,
struct resource *irq, int flags,
- driver_intr_t *intr, void *arg, void **cookiep);
+ driver_filter_t *filter, driver_intr_t *intr,
+ void *arg, void **cookiep);
static int csa_teardown_intr(device_t bus, device_t child,
struct resource *irq, void *cookie);
static driver_intr_t csa_intr;
@@ -439,12 +440,17 @@ csa_release_resource(device_t bus, device_t child, int type, int rid,
static int
csa_setup_intr(device_t bus, device_t child,
struct resource *irq, int flags,
- driver_intr_t *intr, void *arg, void **cookiep)
+ driver_filter_t *filter, driver_intr_t *intr, void *arg,
+ void **cookiep)
{
sc_p scp;
csa_res *resp;
struct sndcard_func *func;
+ if (filter != NULL) {
+ printf("ata-csa.c: we cannot use a filter here\n");
+ return (EINVAL);
+ }
scp = device_get_softc(bus);
resp = &scp->res;
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index 2519285..00ce0ec 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -2834,7 +2834,7 @@ emu_pci_attach(device_t dev)
i = 0;
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, RF_ACTIVE | RF_SHAREABLE);
- if ((sc->irq == NULL) || bus_setup_intr(dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, emu_intr, sc, &sc->ih)) {
+ if ((sc->irq == NULL) || bus_setup_intr(dev, sc->irq, INTR_MPSAFE | INTR_TYPE_AV, NULL, emu_intr, sc, &sc->ih)) {
device_printf(dev, "unable to map interrupt\n");
goto bad;
}
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index 823f5f9..87629e3 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -762,7 +762,7 @@ sv_attach(device_t dev) {
sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
- bus_setup_intr(dev, sc->irq, INTR_TYPE_AV, sv_intr, sc, &sc->ih)) {
+ bus_setup_intr(dev, sc->irq, INTR_TYPE_AV, NULL, sv_intr, sc, &sc->ih)) {
device_printf(dev, "sv_attach: Unable to map interrupt\n");
goto fail;
}
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index aed3f57..4aa2ec6 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -129,7 +129,7 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand
#else
flags = INTR_TYPE_AV;
#endif
- return bus_setup_intr(dev, res, flags, hand, param, cookiep);
+ return bus_setup_intr(dev, res, flags, NULL, hand, param, cookiep);
}
#ifndef PCM_DEBUG_MTX
OpenPOWER on IntegriCloud