summaryrefslogtreecommitdiffstats
path: root/sys/dev
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
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')
-rw-r--r--sys/dev/aac/aac.c12
-rw-r--r--sys/dev/aac/aacvar.h2
-rw-r--r--sys/dev/acpica/Osd/OsdInterrupt.c2
-rw-r--r--sys/dev/adlink/adlink.c16
-rw-r--r--sys/dev/advansys/adv_eisa.c3
-rw-r--r--sys/dev/advansys/adv_isa.c2
-rw-r--r--sys/dev/advansys/adv_pci.c3
-rw-r--r--sys/dev/advansys/adwcam.c4
-rw-r--r--sys/dev/aha/aha_isa.c2
-rw-r--r--sys/dev/ahb/ahb.c3
-rw-r--r--sys/dev/aic/aic_cbus.c2
-rw-r--r--sys/dev/aic/aic_isa.c2
-rw-r--r--sys/dev/aic/aic_pccard.c2
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.c2
-rw-r--r--sys/dev/aic7xxx/aic7xxx_osm.c2
-rw-r--r--sys/dev/amd/amd.c2
-rw-r--r--sys/dev/amr/amr_pci.c2
-rw-r--r--sys/dev/an/if_an_isa.c2
-rw-r--r--sys/dev/an/if_an_pccard.c2
-rw-r--r--sys/dev/an/if_an_pci.c2
-rw-r--r--sys/dev/ar/if_ar.c2
-rw-r--r--sys/dev/arcmsr/arcmsr.c2
-rw-r--r--sys/dev/arl/if_arl_isa.c2
-rw-r--r--sys/dev/asr/asr.c2
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/ata/ata-cbus.c10
-rw-r--r--sys/dev/ata/ata-chipset.c6
-rw-r--r--sys/dev/ata/ata-pci.c10
-rw-r--r--sys/dev/ata/ata-pci.h2
-rw-r--r--sys/dev/ath/if_ath_pci.c2
-rw-r--r--sys/dev/atkbdc/atkbd_atkbdc.c2
-rw-r--r--sys/dev/atkbdc/psm.c2
-rw-r--r--sys/dev/awi/if_awi_pccard.c2
-rw-r--r--sys/dev/bce/if_bce.c2
-rw-r--r--sys/dev/bfe/if_bfe.c2
-rw-r--r--sys/dev/bge/if_bge.c2
-rw-r--r--sys/dev/bktr/bktr_os.c2
-rw-r--r--sys/dev/buslogic/bt.c2
-rw-r--r--sys/dev/ce/if_ce.c2
-rw-r--r--sys/dev/ciss/ciss.c2
-rw-r--r--sys/dev/cm/if_cm_isa.c2
-rw-r--r--sys/dev/cp/if_cp.c2
-rw-r--r--sys/dev/cs/if_cs_isa.c2
-rw-r--r--sys/dev/cs/if_cs_pccard.c2
-rw-r--r--sys/dev/ct/ct_isa.c2
-rw-r--r--sys/dev/ctau/if_ct.c2
-rw-r--r--sys/dev/cx/if_cx.c2
-rw-r--r--sys/dev/cy/cy.c5
-rw-r--r--sys/dev/cy/cy_isa.c4
-rw-r--r--sys/dev/cy/cy_pci.c6
-rw-r--r--sys/dev/cy/cyvar.h2
-rw-r--r--sys/dev/dc/if_dc.c2
-rw-r--r--sys/dev/de/if_de.c2
-rw-r--r--sys/dev/dpt/dpt_eisa.c2
-rw-r--r--sys/dev/dpt/dpt_pci.c2
-rw-r--r--sys/dev/drm/drm_irq.c2
-rw-r--r--sys/dev/ed/if_ed_cbus.c2
-rw-r--r--sys/dev/ed/if_ed_isa.c2
-rw-r--r--sys/dev/ed/if_ed_pccard.c2
-rw-r--r--sys/dev/ed/if_ed_pci.c2
-rw-r--r--sys/dev/em/if_em.c17
-rw-r--r--sys/dev/en/if_en_pci.c2
-rw-r--r--sys/dev/ep/if_ep_eisa.c4
-rw-r--r--sys/dev/ep/if_ep_isa.c4
-rw-r--r--sys/dev/ep/if_ep_pccard.c2
-rw-r--r--sys/dev/esp/esp_sbus.c2
-rw-r--r--sys/dev/ex/if_ex_isa.c2
-rw-r--r--sys/dev/ex/if_ex_pccard.c2
-rw-r--r--sys/dev/fatm/if_fatm.c2
-rw-r--r--sys/dev/fdc/fdc.c17
-rw-r--r--sys/dev/fe/if_fe.c2
-rw-r--r--sys/dev/firewire/fwohci_pci.c2
-rw-r--r--sys/dev/fxp/if_fxp.c2
-rw-r--r--sys/dev/gem/if_gem_pci.c2
-rw-r--r--sys/dev/hatm/if_hatm.c2
-rw-r--r--sys/dev/hfa/hfa_pci.c2
-rw-r--r--sys/dev/hifn/hifn7751.c2
-rw-r--r--sys/dev/hme/if_hme_pci.c2
-rw-r--r--sys/dev/hme/if_hme_sbus.c2
-rw-r--r--sys/dev/hptmv/entry.c2
-rw-r--r--sys/dev/ichsmb/ichsmb.c2
-rw-r--r--sys/dev/ida/ida_eisa.c2
-rw-r--r--sys/dev/ida/ida_pci.c2
-rw-r--r--sys/dev/idt/idt_pci.c2
-rw-r--r--sys/dev/ie/if_ie_isa.c6
-rw-r--r--sys/dev/iir/iir_pci.c2
-rw-r--r--sys/dev/ipmi/ipmi.c2
-rw-r--r--sys/dev/ips/ips_pci.c3
-rw-r--r--sys/dev/ipw/if_ipw.c2
-rw-r--r--sys/dev/isp/isp_pci.c2
-rw-r--r--sys/dev/isp/isp_sbus.c2
-rw-r--r--sys/dev/iwi/if_iwi.c2
-rw-r--r--sys/dev/ixgb/if_ixgb.c2
-rw-r--r--sys/dev/le/if_le_cbus.c2
-rw-r--r--sys/dev/le/if_le_isa.c2
-rw-r--r--sys/dev/le/if_le_lebuffer.c2
-rw-r--r--sys/dev/le/if_le_ledma.c2
-rw-r--r--sys/dev/le/if_le_pci.c2
-rw-r--r--sys/dev/lge/if_lge.c2
-rw-r--r--sys/dev/lmc/if_lmc.c2
-rw-r--r--sys/dev/mfi/mfi.c2
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mly/mly.c2
-rw-r--r--sys/dev/mpt/mpt_pci.c2
-rw-r--r--sys/dev/mse/mse.c2
-rw-r--r--sys/dev/msk/if_msk.c9
-rw-r--r--sys/dev/mxge/if_mxge.c2
-rw-r--r--sys/dev/my/if_my.c2
-rw-r--r--sys/dev/ncv/ncr53c500_pccard.c2
-rw-r--r--sys/dev/nfe/if_nfe.c2
-rw-r--r--sys/dev/nge/if_nge.c2
-rw-r--r--sys/dev/nsp/nsp_pccard.c2
-rw-r--r--sys/dev/nve/if_nve.c2
-rw-r--r--sys/dev/patm/if_patm_attach.c2
-rw-r--r--sys/dev/pccard/pccard.c31
-rw-r--r--sys/dev/pccard/pccardvarp.h1
-rw-r--r--sys/dev/pccbb/pccbb.c7
-rw-r--r--sys/dev/pccbb/pccbb_pci.c2
-rw-r--r--sys/dev/pccbb/pccbbvar.h3
-rw-r--r--sys/dev/pcf/envctrl.c2
-rw-r--r--sys/dev/pcf/pcf_ebus.c2
-rw-r--r--sys/dev/pcf/pcf_isa.c2
-rw-r--r--sys/dev/ppbus/if_plip.c2
-rw-r--r--sys/dev/ppbus/lpt.c2
-rw-r--r--sys/dev/ppbus/ppbconf.c4
-rw-r--r--sys/dev/ppbus/pps.c9
-rw-r--r--sys/dev/ppc/ppc.c8
-rw-r--r--sys/dev/ppc/ppcvar.h2
-rw-r--r--sys/dev/pst/pst-iop.c2
-rw-r--r--sys/dev/puc/puc.c22
-rw-r--r--sys/dev/puc/puc_bfe.h2
-rw-r--r--sys/dev/ral/if_ral_pci.c2
-rw-r--r--sys/dev/ray/if_ray.c2
-rw-r--r--sys/dev/rc/rc.c4
-rw-r--r--sys/dev/re/if_re.c12
-rw-r--r--sys/dev/rr232x/osm_bsd.c2
-rw-r--r--sys/dev/safe/safe.c2
-rw-r--r--sys/dev/sbni/if_sbni_isa.c2
-rw-r--r--sys/dev/sbni/if_sbni_pci.c2
-rw-r--r--sys/dev/sbsh/if_sbsh.c2
-rw-r--r--sys/dev/scc/scc_bfe.h4
-rw-r--r--sys/dev/scc/scc_core.c24
-rw-r--r--sys/dev/sf/if_sf.c2
-rw-r--r--sys/dev/sio/sio.c12
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/sn/if_sn.c3
-rw-r--r--sys/dev/snc/if_snc_cbus.c2
-rw-r--r--sys/dev/snc/if_snc_pccard.c2
-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
-rw-r--r--sys/dev/sr/if_sr.c2
-rw-r--r--sys/dev/stg/tmc18c30_isa.c2
-rw-r--r--sys/dev/stg/tmc18c30_pccard.c2
-rw-r--r--sys/dev/stg/tmc18c30_pci.c2
-rw-r--r--sys/dev/stge/if_stge.c2
-rw-r--r--sys/dev/sym/sym_hipd.c2
-rw-r--r--sys/dev/ti/if_ti.c2
-rw-r--r--sys/dev/trm/trm.c2
-rw-r--r--sys/dev/twa/tw_osl_freebsd.c44
-rw-r--r--sys/dev/twe/twe_freebsd.c3
-rw-r--r--sys/dev/tx/if_tx.c2
-rw-r--r--sys/dev/txp/if_txp.c2
-rw-r--r--sys/dev/uart/uart_core.c14
-rw-r--r--sys/dev/ubsec/ubsec.c2
-rw-r--r--sys/dev/usb/ehci_pci.c2
-rw-r--r--sys/dev/usb/ohci_pci.c4
-rw-r--r--sys/dev/usb/uhci_pci.c2
-rw-r--r--sys/dev/vge/if_vge.c2
-rw-r--r--sys/dev/vr/if_vr.c2
-rw-r--r--sys/dev/vx/if_vx_eisa.c4
-rw-r--r--sys/dev/vx/if_vx_pci.c2
-rw-r--r--sys/dev/wi/if_wi.c2
-rw-r--r--sys/dev/xe/if_xe.c4
177 files changed, 375 insertions, 286 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 3b6ad54..078f809 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -305,20 +305,21 @@ aac_attach(struct aac_softc *sc)
}
if (sc->flags & AAC_FLAGS_NEW_COMM) {
if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
- INTR_MPSAFE|INTR_TYPE_BIO, aac_new_intr,
- sc, &sc->aac_intr)) {
+ INTR_MPSAFE|INTR_TYPE_BIO, NULL,
+ aac_new_intr, sc, &sc->aac_intr)) {
device_printf(sc->aac_dev, "can't set up interrupt\n");
return (EINVAL);
}
} else {
if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
- INTR_FAST|INTR_TYPE_BIO, aac_fast_intr,
+ INTR_TYPE_BIO, aac_fast_intr, NULL,
sc, &sc->aac_intr)) {
device_printf(sc->aac_dev,
"can't set up FAST interrupt\n");
if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
INTR_MPSAFE|INTR_TYPE_BIO,
- aac_fast_intr, sc, &sc->aac_intr)) {
+ NULL, (driver_intr_t *)aac_fast_intr,
+ sc, &sc->aac_intr)) {
device_printf(sc->aac_dev,
"can't set up MPSAFE interrupt\n");
return (EINVAL);
@@ -780,7 +781,7 @@ aac_new_intr(void *arg)
mtx_unlock(&sc->aac_io_lock);
}
-void
+int
aac_fast_intr(void *arg)
{
struct aac_softc *sc;
@@ -822,6 +823,7 @@ aac_fast_intr(void *arg)
*/
wakeup(sc->aifthread);
}
+ return (FILTER_HANDLED);
}
/*
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index a5ae32b..de3425b 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -425,7 +425,7 @@ extern int aac_shutdown(device_t dev);
extern int aac_suspend(device_t dev);
extern int aac_resume(device_t dev);
extern void aac_new_intr(void *arg);
-extern void aac_fast_intr(void *arg);
+extern int aac_fast_intr(void *arg);
extern void aac_submit_bio(struct bio *bp);
extern void aac_biodone(struct bio *bp);
extern void aac_startio(struct aac_softc *sc);
diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c
index 4842cfc..c973124 100644
--- a/sys/dev/acpica/Osd/OsdInterrupt.c
+++ b/sys/dev/acpica/Osd/OsdInterrupt.c
@@ -86,7 +86,7 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber,
goto error;
}
if (bus_setup_intr(sc->acpi_dev, sc->acpi_irq, INTR_TYPE_MISC|INTR_MPSAFE,
- (driver_intr_t *)ServiceRoutine, Context, &sc->acpi_irq_handle)) {
+ NULL, (driver_intr_t *)ServiceRoutine, Context, &sc->acpi_irq_handle)) {
device_printf(sc->acpi_dev, "could not set up interrupt\n");
goto error;
}
diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c
index 75b55dc..1a669fc 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) {
diff --git a/sys/dev/advansys/adv_eisa.c b/sys/dev/advansys/adv_eisa.c
index 08b98d0..6afdc5f 100644
--- a/sys/dev/advansys/adv_eisa.c
+++ b/sys/dev/advansys/adv_eisa.c
@@ -323,7 +323,8 @@ adv_eisa_attach(device_t dev)
/*
* Enable our interrupt handler.
*/
- bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, adv_intr, adv, &ih);
+ bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, adv_intr,
+ adv, &ih);
/* Attach sub-devices - always succeeds */
adv_attach(adv);
diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c
index dde65ef..182ca54 100644
--- a/sys/dev/advansys/adv_isa.c
+++ b/sys/dev/advansys/adv_isa.c
@@ -337,7 +337,7 @@ adv_isa_probe(device_t dev)
RF_ACTIVE);
if (irqres == NULL ||
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY,
- adv_intr, adv, &ih)) {
+ NULL, adv_intr, adv, &ih)) {
bus_dmamap_unload(overrun_dmat, overrun_dmamap);
bus_dmamem_free(overrun_dmat, overrun_buf,
overrun_dmamap);
diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c
index 7ce53b6..6a073ba 100644
--- a/sys/dev/advansys/adv_pci.c
+++ b/sys/dev/advansys/adv_pci.c
@@ -309,7 +309,8 @@ adv_pci_attach(device_t dev)
irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irqrid,
RF_SHAREABLE | RF_ACTIVE);
if (irqres == NULL ||
- bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY, adv_intr, adv, &ih)) {
+ bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY, NULL,
+ adv_intr, adv, &ih)) {
adv_free(adv);
bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c
index ccf15eb..78b8fdd 100644
--- a/sys/dev/advansys/adwcam.c
+++ b/sys/dev/advansys/adwcam.c
@@ -1213,8 +1213,8 @@ adw_attach(struct adw_softc *adw)
s = splcam();
/* Hook up our interrupt handler */
if ((error = bus_setup_intr(adw->device, adw->irq,
- INTR_TYPE_CAM | INTR_ENTROPY, adw_intr,
- adw, &adw->ih)) != 0) {
+ INTR_TYPE_CAM | INTR_ENTROPY, NULL,
+ adw_intr, adw, &adw->ih)) != 0) {
device_printf(adw->device, "bus_setup_intr() failed: %d\n",
error);
goto fail;
diff --git a/sys/dev/aha/aha_isa.c b/sys/dev/aha/aha_isa.c
index 93e7955..b29d370 100644
--- a/sys/dev/aha/aha_isa.c
+++ b/sys/dev/aha/aha_isa.c
@@ -272,7 +272,7 @@ aha_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, aha->irq, INTR_TYPE_CAM|INTR_ENTROPY,
- aha_intr, aha, &ih);
+ NULL, aha_intr, aha, &ih);
if (error) {
device_printf(dev, "Unable to register interrupt handler\n");
goto fail;
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c
index 4455886..051688b 100644
--- a/sys/dev/ahb/ahb.c
+++ b/sys/dev/ahb/ahb.c
@@ -378,7 +378,8 @@ ahbattach(device_t dev)
goto error_exit;
/* Enable our interrupt */
- bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, ahbintr, ahb, &ih);
+ bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, ahbintr,
+ ahb, &ih);
return (0);
error_exit:
diff --git a/sys/dev/aic/aic_cbus.c b/sys/dev/aic/aic_cbus.c
index f72df43..aa43782 100644
--- a/sys/dev/aic/aic_cbus.c
+++ b/sys/dev/aic/aic_cbus.c
@@ -211,7 +211,7 @@ aic_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_CAM|INTR_ENTROPY,
- aic_intr, aic, &sc->sc_ih);
+ NULL, aic_intr, aic, &sc->sc_ih);
if (error) {
device_printf(dev, "failed to register interrupt handler\n");
aic_isa_release_resources(dev);
diff --git a/sys/dev/aic/aic_isa.c b/sys/dev/aic/aic_isa.c
index 71736f2..f5f96e8 100644
--- a/sys/dev/aic/aic_isa.c
+++ b/sys/dev/aic/aic_isa.c
@@ -188,7 +188,7 @@ aic_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_CAM|INTR_ENTROPY,
- aic_intr, aic, &sc->sc_ih);
+ NULL, aic_intr, aic, &sc->sc_ih);
if (error) {
device_printf(dev, "failed to register interrupt handler\n");
aic_isa_release_resources(dev);
diff --git a/sys/dev/aic/aic_pccard.c b/sys/dev/aic/aic_pccard.c
index fa293cb..e4273c6 100644
--- a/sys/dev/aic/aic_pccard.c
+++ b/sys/dev/aic/aic_pccard.c
@@ -142,7 +142,7 @@ aic_pccard_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_CAM|INTR_ENTROPY,
- aic_intr, aic, &sc->sc_ih);
+ NULL, aic_intr, aic, &sc->sc_ih);
if (error) {
device_printf(dev, "failed to register interrupt handler\n");
aic_pccard_release_resources(dev);
diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c
index e33fb0e..e16b421 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.c
+++ b/sys/dev/aic7xxx/aic79xx_osm.c
@@ -95,7 +95,7 @@ ahd_map_int(struct ahd_softc *ahd)
/* Hook up our interrupt handler */
error = bus_setup_intr(ahd->dev_softc, ahd->platform_data->irq,
- INTR_TYPE_CAM, ahd_platform_intr, ahd,
+ INTR_TYPE_CAM, NULL, ahd_platform_intr, ahd,
&ahd->platform_data->ih);
if (error != 0)
device_printf(ahd->dev_softc, "bus_setup_intr() failed: %d\n",
diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c
index 0de7e8d..f3b106c 100644
--- a/sys/dev/aic7xxx/aic7xxx_osm.c
+++ b/sys/dev/aic7xxx/aic7xxx_osm.c
@@ -107,7 +107,7 @@ ahc_map_int(struct ahc_softc *ahc)
/* Hook up our interrupt handler */
error = bus_setup_intr(ahc->dev_softc, ahc->platform_data->irq,
- INTR_TYPE_CAM, ahc_platform_intr, ahc,
+ INTR_TYPE_CAM, NULL, ahc_platform_intr, ahc,
&ahc->platform_data->ih);
if (error != 0)
diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c
index 6541110..4c8ed41 100644
--- a/sys/dev/amd/amd.c
+++ b/sys/dev/amd/amd.c
@@ -2460,7 +2460,7 @@ amd_attach(device_t dev)
RF_SHAREABLE | RF_ACTIVE);
if (irqres == NULL ||
bus_setup_intr(dev, irqres, INTR_TYPE_CAM | INTR_ENTROPY,
- amd_intr, amd, &ih)) {
+ NULL, amd_intr, amd, &ih)) {
if (bootverbose)
printf("amd%d: unable to register interrupt handler!\n",
unit);
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index 7d48572..2c7e78a 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -263,7 +263,7 @@ amr_pci_attach(device_t dev)
goto out;
}
if (bus_setup_intr(sc->amr_dev, sc->amr_irq,
- INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE, amr_pci_intr,
+ INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE, NULL, amr_pci_intr,
sc, &sc->amr_intr)) {
device_printf(sc->amr_dev, "can't set up interrupt\n");
goto out;
diff --git a/sys/dev/an/if_an_isa.c b/sys/dev/an/if_an_isa.c
index 6baccaf..80933b1 100644
--- a/sys/dev/an/if_an_isa.c
+++ b/sys/dev/an/if_an_isa.c
@@ -122,7 +122,7 @@ an_attach_isa(device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- an_intr, sc, &sc->irq_handle);
+ NULL, an_intr, sc, &sc->irq_handle);
if (error) {
an_release_resources(dev);
return (error);
diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c
index cde90c7..b475265 100644
--- a/sys/dev/an/if_an_pccard.c
+++ b/sys/dev/an/if_an_pccard.c
@@ -153,7 +153,7 @@ an_pccard_attach(device_t dev)
* Must setup the interrupt after the an_attach to prevent racing.
*/
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- an_intr, sc, &sc->irq_handle);
+ NULL, an_intr, sc, &sc->irq_handle);
fail:
if (error)
an_release_resources(dev);
diff --git a/sys/dev/an/if_an_pci.c b/sys/dev/an/if_an_pci.c
index 5098f50..a284c8a 100644
--- a/sys/dev/an/if_an_pci.c
+++ b/sys/dev/an/if_an_pci.c
@@ -240,7 +240,7 @@ an_attach_pci(dev)
* Must setup the interrupt after the an_attach to prevent racing.
*/
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- an_intr, sc, &sc->irq_handle);
+ NULL, an_intr, sc, &sc->irq_handle);
fail:
if (error)
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index b29c26b..fbce1d9 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -259,7 +259,7 @@ ar_attach(device_t device)
arc_init(hc);
if(bus_setup_intr(device, hc->res_irq,
- INTR_TYPE_NET, arintr, hc, &hc->intr_cookie) != 0)
+ INTR_TYPE_NET, NULL, arintr, hc, &hc->intr_cookie) != 0)
return (1);
sc = hc->sc;
diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index 0f3638c..185e0da 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -2117,7 +2117,7 @@ static u_int32_t arcmsr_attach(device_t dev)
irqres=bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE);
if(irqres == NULL ||
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE
- , arcmsr_interrupt, acb, &acb->ih)) {
+ , NULL, arcmsr_interrupt, acb, &acb->ih)) {
arcmsr_free_resource(acb);
printf("arcmsr%d: unable to register interrupt handler!\n", unit);
return ENXIO;
diff --git a/sys/dev/arl/if_arl_isa.c b/sys/dev/arl/if_arl_isa.c
index 5f985aa..11cbf5f 100644
--- a/sys/dev/arl/if_arl_isa.c
+++ b/sys/dev/arl/if_arl_isa.c
@@ -303,7 +303,7 @@ arl_isa_attach (device_t dev)
arl_alloc_irq(dev, sc->irq_rid, 0);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- arl_intr, sc, &sc->irq_handle);
+ NULL, arl_intr, sc, &sc->irq_handle);
if (error) {
arl_release_resources(dev);
return (error);
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 9c8dde4..1de0bfd 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -2297,7 +2297,7 @@ asr_pci_map_int(device_t dev, Asr_softc_t *sc)
return (0);
}
if (bus_setup_intr(dev, sc->ha_irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- (driver_intr_t *)asr_intr, (void *)sc, &(sc->ha_intr))) {
+ NULL, (driver_intr_t *)asr_intr, (void *)sc, &(sc->ha_intr))) {
return (0);
}
sc->ha_irq = pci_read_config(dev, PCIR_INTLINE, sizeof(char));
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 1e5d470..39c1dd6 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -134,7 +134,7 @@ ata_attach(device_t dev)
device_printf(dev, "unable to allocate interrupt\n");
return ENXIO;
}
- if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS,
+ if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL,
(driver_intr_t *)ata_interrupt, ch, &ch->ih))) {
device_printf(dev, "unable to setup interrupt\n");
return error;
diff --git a/sys/dev/ata/ata-cbus.c b/sys/dev/ata/ata-cbus.c
index a58109d..c978dc3 100644
--- a/sys/dev/ata/ata-cbus.c
+++ b/sys/dev/ata/ata-cbus.c
@@ -144,7 +144,7 @@ ata_cbus_attach(device_t dev)
}
if ((bus_setup_intr(dev, ctlr->irq, ATA_INTR_FLAGS,
- ata_cbus_intr, ctlr, &ctlr->ih))) {
+ NULL, ata_cbus_intr, ctlr, &ctlr->ih))) {
device_printf(dev, "unable to setup interrupt\n");
bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, ctlr->io);
bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlr->ctlio);
@@ -188,12 +188,16 @@ ata_cbus_alloc_resource(device_t dev, device_t child, int type, int *rid,
static int
ata_cbus_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 ata_cbus_controller *controller = device_get_softc(dev);
int unit = ((struct ata_channel *)device_get_softc(child))->unit;
+ if (filter != NULL) {
+ printf("ata-cbus.c: we cannot use a filter here\n");
+ return (EINVAL);
+ }
controller->interrupt[unit].function = intr;
controller->interrupt[unit].argument = arg;
*cookiep = controller;
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index dcd40f4..783cf26 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -3267,7 +3267,7 @@ ata_promise_chipinit(device_t dev)
u_int32_t dimm = ATA_INL(ctlr->r_res2, 0x000c0080);
if (bus_teardown_intr(dev, ctlr->r_irq, ctlr->handle) ||
- bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS,
+ bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL,
ata_promise_sx4_intr, ctlr, &ctlr->handle)) {
device_printf(dev, "unable to setup interrupt\n");
goto failnfree;
@@ -3301,7 +3301,7 @@ ata_promise_chipinit(device_t dev)
/* mio type controllers need an interrupt intercept */
if (bus_teardown_intr(dev, ctlr->r_irq, ctlr->handle) ||
- bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS,
+ bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL,
ata_promise_mio_intr, ctlr, &ctlr->handle)) {
device_printf(dev, "unable to setup interrupt\n");
goto failnfree;
@@ -5161,7 +5161,7 @@ ata_setup_interrupt(device_t dev)
device_printf(dev, "unable to map interrupt\n");
return ENXIO;
}
- if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS,
+ if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL,
ata_generic_intr, ctlr, &ctlr->handle))) {
device_printf(dev, "unable to setup interrupt\n");
return ENXIO;
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 3bc6d8f..d1b4b9a 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -339,17 +339,21 @@ ata_pci_release_resource(device_t dev, device_t child, int type, int rid,
int
ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq,
- int flags, driver_intr_t *function, void *argument,
- void **cookiep)
+ int flags, driver_filter_t *filter, driver_intr_t *function,
+ void *argument, void **cookiep)
{
if (ata_legacy(dev)) {
return BUS_SETUP_INTR(device_get_parent(dev), child, irq,
- flags, function, argument, cookiep);
+ flags, filter, function, argument, cookiep);
}
else {
struct ata_pci_controller *controller = device_get_softc(dev);
int unit = ((struct ata_channel *)device_get_softc(child))->unit;
+ if (filter != NULL) {
+ printf("ata-pci.c: we cannot use a filter here\n");
+ return (EINVAL);
+ }
controller->interrupt[unit].function = function;
controller->interrupt[unit].argument = argument;
*cookiep = controller;
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index d7fc883..9f9e29b 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -430,7 +430,7 @@ int ata_pci_attach(device_t dev);
int ata_pci_detach(device_t dev);
struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r);
-int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_intr_t *function, void *argument, void **cookiep);
+int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep);
int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie);
int ata_pci_allocate(device_t dev);
void ata_pci_hw(device_t dev);
diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c
index 20ca504..8c931c6 100644
--- a/sys/dev/ath/if_ath_pci.c
+++ b/sys/dev/ath/if_ath_pci.c
@@ -169,7 +169,7 @@ ath_pci_attach(device_t dev)
}
if (bus_setup_intr(dev, psc->sc_irq,
INTR_TYPE_NET | INTR_MPSAFE,
- ath_intr, sc, &psc->sc_ih)) {
+ NULL, ath_intr, sc, &psc->sc_ih)) {
device_printf(dev, "could not establish interrupt\n");
goto bad2;
}
diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c
index 63c30d9..ec6555b 100644
--- a/sys/dev/atkbdc/atkbd_atkbdc.c
+++ b/sys/dev/atkbdc/atkbd_atkbdc.c
@@ -136,7 +136,7 @@ atkbdattach(device_t dev)
RF_SHAREABLE | RF_ACTIVE);
if (sc->intr == NULL)
return ENXIO;
- error = bus_setup_intr(dev, sc->intr, INTR_TYPE_TTY, atkbdintr,
+ error = bus_setup_intr(dev, sc->intr, INTR_TYPE_TTY, NULL, atkbdintr,
kbd, &sc->ih);
if (error)
bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr);
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 754799f..dfac849 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -1285,7 +1285,7 @@ psmattach(device_t dev)
RF_SHAREABLE | RF_ACTIVE);
if (sc->intr == NULL)
return (ENXIO);
- error = bus_setup_intr(dev, sc->intr, INTR_TYPE_TTY, psmintr, sc, &sc->ih);
+ error = bus_setup_intr(dev, sc->intr, INTR_TYPE_TTY, NULL, psmintr, sc, &sc->ih);
if (error) {
bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr);
return (error);
diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c
index 28c0e17..815b15b 100644
--- a/sys/dev/awi/if_awi_pccard.c
+++ b/sys/dev/awi/if_awi_pccard.c
@@ -239,7 +239,7 @@ awi_pccard_enable(struct awi_softc *sc)
if (psc->sc_intrhand == 0) {
error = bus_setup_intr(dev, psc->sc_irq_res, INTR_TYPE_NET,
- (void (*)(void *))awi_intr, sc, &psc->sc_intrhand);
+ NULL, (void (*)(void *))awi_intr, sc, &psc->sc_intrhand);
if (error) {
device_printf(dev,
"couldn't establish interrupt error=%d\n", error);
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index fc3c947..fc634c0 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -754,7 +754,7 @@ bce_attach(device_t dev)
#endif
/* Hookup IRQ last. */
- rc = bus_setup_intr(dev, sc->bce_irq, INTR_TYPE_NET | INTR_MPSAFE,
+ rc = bus_setup_intr(dev, sc->bce_irq, INTR_TYPE_NET | INTR_MPSAFE, NULL,
bce_intr, sc, &sc->bce_intrhand);
if (rc) {
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index dc24da9..b88a6bd 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -423,7 +423,7 @@ bfe_attach(device_t dev)
* Hook interrupt last to avoid having to lock softc
*/
error = bus_setup_intr(dev, sc->bfe_irq, INTR_TYPE_NET | INTR_MPSAFE,
- bfe_intr, sc, &sc->bfe_intrhand);
+ NULL, bfe_intr, sc, &sc->bfe_intrhand);
if (error) {
printf("bfe%d: couldn't set up irq\n", unit);
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index f7ec758..1243669 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2505,7 +2505,7 @@ again:
* Hookup IRQ last.
*/
error = bus_setup_intr(dev, sc->bge_irq, INTR_TYPE_NET | INTR_MPSAFE,
- bge_intr, sc, &sc->bge_intrhand);
+ NULL, bge_intr, sc, &sc->bge_intrhand);
if (error) {
bge_detach(dev);
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index e51cdf9..9ce258c 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -384,7 +384,7 @@ bktr_attach( device_t dev )
}
error = bus_setup_intr(dev, bktr->res_irq, INTR_TYPE_TTY,
- bktr_intr, bktr, &bktr->res_ih);
+ NULL, bktr_intr, bktr, &bktr->res_ih);
if (error) {
device_printf(dev, "could not setup irq\n");
goto fail;
diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c
index af030a5..7eee35b 100644
--- a/sys/dev/buslogic/bt.c
+++ b/sys/dev/buslogic/bt.c
@@ -896,7 +896,7 @@ bt_attach(device_t dev)
/*
* Setup interrupt.
*/
- error = bus_setup_intr(dev, bt->irq, INTR_TYPE_CAM|INTR_ENTROPY,
+ error = bus_setup_intr(dev, bt->irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL,
bt_intr, bt, &bt->ih);
if (error) {
device_printf(dev, "bus_setup_intr() failed: %d\n", error);
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index cf4204e..7de8e18 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -667,7 +667,7 @@ static int ce_attach (device_t dev)
#else
INTR_TYPE_NET,
#endif
- ce_intr, bd, &bd->ce_intrhand);
+ NULL, ce_intr, bd, &bd->ce_intrhand);
if (error) {
printf ("ce%d: cannot set up irq\n", unit);
bus_release_resource (dev, SYS_RES_IRQ, 0, bd->ce_irq);
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 7b0d680..f23017b 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -655,7 +655,7 @@ ciss_init_pci(struct ciss_softc *sc)
return(ENXIO);
}
if (bus_setup_intr(sc->ciss_dev, sc->ciss_irq_resource,
- INTR_TYPE_CAM|INTR_ENTROPY, ciss_intr, sc,
+ INTR_TYPE_CAM|INTR_ENTROPY, NULL, ciss_intr, sc,
&sc->ciss_intr)) {
ciss_printf(sc, "can't set up interrupt\n");
return(ENXIO);
diff --git a/sys/dev/cm/if_cm_isa.c b/sys/dev/cm/if_cm_isa.c
index e8cf14a..2986c60 100644
--- a/sys/dev/cm/if_cm_isa.c
+++ b/sys/dev/cm/if_cm_isa.c
@@ -107,7 +107,7 @@ cm_isa_attach(dev)
mtx_init(&sc->sc_mtx, device_get_nameunit(dev),
MTX_NETWORK_LOCK, MTX_DEF);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- cmintr, sc, &sc->irq_handle);
+ NULL, cmintr, sc, &sc->irq_handle);
if (error)
goto err;
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index fbd0b0e..95b372a 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -481,7 +481,7 @@ static int cp_attach (device_t dev)
callout_init (&led_timo[unit], cp_mpsafenet ? CALLOUT_MPSAFE : 0);
error = bus_setup_intr (dev, bd->cp_irq,
INTR_TYPE_NET|(cp_mpsafenet?INTR_MPSAFE:0),
- cp_intr, bd, &bd->cp_intrhand);
+ NULL, cp_intr, bd, &bd->cp_intrhand);
if (error) {
cp_destroy = 1;
printf ("cp%d: cannot set up irq\n", unit);
diff --git a/sys/dev/cs/if_cs_isa.c b/sys/dev/cs/if_cs_isa.c
index 8064f4b..9c3bd30 100644
--- a/sys/dev/cs/if_cs_isa.c
+++ b/sys/dev/cs/if_cs_isa.c
@@ -99,7 +99,7 @@ cs_isa_attach(device_t dev)
cs_alloc_irq(dev, sc->irq_rid, 0);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- csintr, sc, &sc->irq_handle);
+ NULL, csintr, sc, &sc->irq_handle);
if (error) {
cs_release_resources(dev);
return (error);
diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c
index 794f48d..fbb5587 100644
--- a/sys/dev/cs/if_cs_pccard.c
+++ b/sys/dev/cs/if_cs_pccard.c
@@ -91,7 +91,7 @@ cs_pccard_attach(device_t dev)
if (error != 0)
goto bad;
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- csintr, sc, &sc->irq_handle);
+ NULL, csintr, sc, &sc->irq_handle);
if (error != 0)
goto bad;
diff --git a/sys/dev/ct/ct_isa.c b/sys/dev/ct/ct_isa.c
index 7d6dad6..a1e3045 100644
--- a/sys/dev/ct/ct_isa.c
+++ b/sys/dev/ct/ct_isa.c
@@ -330,7 +330,7 @@ ct_isa_attach(device_t dev)
splx(s);
if (bus_setup_intr(dev, ct->irq_res, INTR_TYPE_CAM,
- (driver_intr_t *)ctintr, ct, &ct->sc_ih)) {
+ NULL, (driver_intr_t *)ctintr, ct, &ct->sc_ih)) {
ct_space_unmap(dev, ct);
return ENXIO;
}
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index 7846334..079017b 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -682,7 +682,7 @@ static int ct_attach (device_t dev)
s = splimp ();
if (bus_setup_intr (dev, bd->irq_res,
INTR_TYPE_NET|(ct_mpsafenet?INTR_MPSAFE:0),
- ct_intr, bd, &bd->intrhand)) {
+ NULL, ct_intr, bd, &bd->intrhand)) {
printf ("ct%d: Can't setup irq %ld\n", unit, irq);
bd->board = 0;
adapter [unit] = 0;
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index 4aa9829..7eedee7 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -780,7 +780,7 @@ static int cx_attach (device_t dev)
s = splhigh ();
if (bus_setup_intr (dev, bd->irq_res,
INTR_TYPE_NET|(cx_mpsafenet?INTR_MPSAFE:0),
- cx_intr, bd, &bd->intrhand)) {
+ NULL, cx_intr, bd, &bd->intrhand)) {
printf ("cx%d: Can't setup irq %ld\n", unit, irq);
bd->board = 0;
b->sys = 0;
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index c09bb1d..bfb83df 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -644,7 +644,7 @@ cyinput(struct com_s *com)
com->mcr_image |= com->mcr_rts);
}
-void
+int
cyintr(void *vcom)
{
struct com_s *basecom;
@@ -671,7 +671,7 @@ cyintr(void *vcom)
/* poll to see if it has any work */
status = cd_inb(iobase, CD1400_SVRR, cy_align);
if (status == 0)
- continue;
+ continue; // XXX - FILTER_STRAY?
#ifdef CyDebug
++cy_svrr_probes;
#endif
@@ -1111,6 +1111,7 @@ terminate_tx_service:
swi_sched(cy_slow_ih, SWI_DELAY);
COM_UNLOCK();
+ return (FILTER_HANDLED);
}
static void
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index a5203a7..390ccd2 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -133,8 +133,8 @@ cy_isa_attach(device_t dev)
device_printf(dev, "interrupt resource allocation failed\n");
goto fail;
}
- if (bus_setup_intr(dev, irq_res, INTR_TYPE_TTY | INTR_FAST, cyintr,
- vsc, &irq_cookie) != 0) {
+ if (bus_setup_intr(dev, irq_res, INTR_TYPE_TTY,
+ cyintr, NULL, vsc, &irq_cookie) != 0) {
device_printf(dev, "interrupt setup failed\n");
goto fail;
}
diff --git a/sys/dev/cy/cy_pci.c b/sys/dev/cy/cy_pci.c
index 2d07235..3cc3a3b 100644
--- a/sys/dev/cy/cy_pci.c
+++ b/sys/dev/cy/cy_pci.c
@@ -145,14 +145,14 @@ cy_pci_attach(dev)
goto fail;
}
#ifdef CY_PCI_FASTINTR
- irq_setup = bus_setup_intr(dev, irq_res, INTR_TYPE_TTY | INTR_FAST,
- cyintr, vsc, &irq_cookie);
+ irq_setup = bus_setup_intr(dev, irq_res, INTR_TYPE_TTY,
+ cyintr, NULL, vsc, &irq_cookie);
#else
irq_setup = ENXIO;
#endif
if (irq_setup != 0)
irq_setup = bus_setup_intr(dev, irq_res, INTR_TYPE_TTY,
- cyintr, vsc, &irq_cookie);
+ NULL, (driver_intr_t *)cyintr, vsc, &irq_cookie);
if (irq_setup != 0) {
device_printf(dev, "interrupt setup failed\n");
goto fail;
diff --git a/sys/dev/cy/cyvar.h b/sys/dev/cy/cyvar.h
index 15ee98c..6b770e8 100644
--- a/sys/dev/cy/cyvar.h
+++ b/sys/dev/cy/cyvar.h
@@ -32,5 +32,5 @@ extern devclass_t cy_devclass;
extern char cy_driver_name[];
void *cyattach_common(cy_addr cy_iobase, int cy_align);
-driver_intr_t cyintr;
+driver_filter_t cyintr;
int cy_units(cy_addr cy_iobase, int cy_align);
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index c699629..42474dc 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2265,7 +2265,7 @@ dc_attach(device_t dev)
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->dc_irq, INTR_TYPE_NET | INTR_MPSAFE,
- dc_intr, sc, &sc->dc_intrhand);
+ NULL, dc_intr, sc, &sc->dc_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index c41efe3..2a51241 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -4890,7 +4890,7 @@ tulip_pci_attach(device_t dev)
res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
RF_SHAREABLE | RF_ACTIVE);
if (res == 0 || bus_setup_intr(dev, res, INTR_TYPE_NET |
- INTR_MPSAFE, intr_rtn, sc, &ih)) {
+ INTR_MPSAFE, NULL, intr_rtn, sc, &ih)) {
device_printf(dev, "couldn't map interrupt\n");
tulip_busdma_cleanup(sc);
ether_ifdetach(sc->tulip_ifp);
diff --git a/sys/dev/dpt/dpt_eisa.c b/sys/dev/dpt/dpt_eisa.c
index 742f9fa..431cf1e 100644
--- a/sys/dev/dpt/dpt_eisa.c
+++ b/sys/dev/dpt/dpt_eisa.c
@@ -155,7 +155,7 @@ dpt_eisa_attach (device_t dev)
splx(s);
if (bus_setup_intr(dev, dpt->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- dpt_intr, dpt, &dpt->ih)) {
+ NULL, dpt_intr, dpt, &dpt->ih)) {
device_printf(dev, "Unable to register interrupt handler\n");
error = ENXIO;
goto bad;
diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c
index e5bc6bc..9ca718c7b 100644
--- a/sys/dev/dpt/dpt_pci.c
+++ b/sys/dev/dpt/dpt_pci.c
@@ -163,7 +163,7 @@ dpt_pci_attach (device_t dev)
splx(s);
if (bus_setup_intr(dev, dpt->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- dpt_intr, dpt, &dpt->ih)) {
+ NULL, dpt_intr, dpt, &dpt->ih)) {
device_printf(dev, "Unable to register interrupt handler\n");
error = ENXIO;
goto bad;
diff --git a/sys/dev/drm/drm_irq.c b/sys/dev/drm/drm_irq.c
index 791f11c..580980e 100644
--- a/sys/dev/drm/drm_irq.c
+++ b/sys/dev/drm/drm_irq.c
@@ -110,7 +110,7 @@ int drm_irq_install(drm_device_t *dev)
dev->irq_handler, dev, &dev->irqh);
#else
retcode = bus_setup_intr(dev->device, dev->irqr, INTR_TYPE_TTY | INTR_MPSAFE,
- drm_irq_handler_wrap, dev, &dev->irqh);
+ NULL, drm_irq_handler_wrap, dev, &dev->irqh);
#endif
if (retcode != 0)
goto err;
diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c
index cf78b55..dc4fabb 100644
--- a/sys/dev/ed/if_ed_cbus.c
+++ b/sys/dev/ed/if_ed_cbus.c
@@ -243,7 +243,7 @@ ed_cbus_attach(dev)
ed_alloc_irq(dev, sc->irq_rid, 0);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- edintr, sc, &sc->irq_handle);
+ NULL, edintr, sc, &sc->irq_handle);
if (error) {
ed_release_resources(dev);
return (error);
diff --git a/sys/dev/ed/if_ed_isa.c b/sys/dev/ed/if_ed_isa.c
index c0cd7ff..7d30614 100644
--- a/sys/dev/ed/if_ed_isa.c
+++ b/sys/dev/ed/if_ed_isa.c
@@ -170,7 +170,7 @@ ed_isa_attach(device_t dev)
ed_alloc_irq(dev, sc->irq_rid, 0);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- edintr, sc, &sc->irq_handle);
+ NULL, edintr, sc, &sc->irq_handle);
if (error) {
ed_release_resources(dev);
return (error);
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c
index 63877ef..a1e2938 100644
--- a/sys/dev/ed/if_ed_pccard.c
+++ b/sys/dev/ed/if_ed_pccard.c
@@ -478,7 +478,7 @@ ed_pccard_attach(device_t dev)
goto bad;
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- edintr, sc, &sc->irq_handle);
+ NULL, edintr, sc, &sc->irq_handle);
if (error) {
device_printf(dev, "setup intr failed %d \n", error);
goto bad;
diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c
index 67a655f..68099ce 100644
--- a/sys/dev/ed/if_ed_pci.c
+++ b/sys/dev/ed/if_ed_pci.c
@@ -107,7 +107,7 @@ ed_pci_attach(device_t dev)
return (error);
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- edintr, sc, &sc->irq_handle);
+ NULL, edintr, sc, &sc->irq_handle);
if (error) {
ed_release_resources(dev);
return (error);
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 47baffb..570b30d 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -275,7 +275,7 @@ static void em_add_int_delay_sysctl(struct adapter *, const char *,
static poll_handler_t em_poll;
static void em_intr(void *);
#else
-static void em_intr_fast(void *);
+static int em_intr_fast(void *);
static void em_add_int_process_limit(struct adapter *, const char *,
const char *, int *, int);
static void em_handle_rxtx(void *context, int pending);
@@ -1307,7 +1307,7 @@ em_handle_rxtx(void *context, int pending)
* Fast Interrupt Service routine
*
*********************************************************************/
-static void
+static int
em_intr_fast(void *arg)
{
struct adapter *adapter = arg;
@@ -1320,11 +1320,11 @@ em_intr_fast(void *arg)
/* Hot eject? */
if (reg_icr == 0xffffffff)
- return;
+ return (FILTER_STRAY);
/* Definitely not our interrupt. */
if (reg_icr == 0x0)
- return;
+ return (FILTER_STRAY);
/*
* Starting with the 82571 chip, bit 31 should be used to
@@ -1332,7 +1332,7 @@ em_intr_fast(void *arg)
*/
if (adapter->hw.mac_type >= em_82571 &&
(reg_icr & E1000_ICR_INT_ASSERTED) == 0)
- return;
+ return (FILTER_STRAY);
/*
* Mask interrupts until the taskqueue is finished running. This is
@@ -1348,6 +1348,7 @@ em_intr_fast(void *arg)
if (reg_icr & E1000_ICR_RXO)
adapter->rx_overruns++;
+ return (FILTER_HANDLED);
}
#endif /* ! DEVICE_POLLING */
@@ -2173,8 +2174,8 @@ em_allocate_intr(struct adapter *adapter)
#ifdef DEVICE_POLLING
if (adapter->int_handler_tag == NULL && (error = bus_setup_intr(dev,
- adapter->res_interrupt, INTR_TYPE_NET | INTR_MPSAFE, em_intr, adapter,
- &adapter->int_handler_tag)) != 0) {
+ adapter->res_interrupt, INTR_TYPE_NET | INTR_MPSAFE, NULL, em_intr,
+ adapter, &adapter->int_handler_tag)) != 0) {
device_printf(dev, "Failed to register interrupt handler");
return (error);
}
@@ -2190,7 +2191,7 @@ em_allocate_intr(struct adapter *adapter)
taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s taskq",
device_get_nameunit(adapter->dev));
if ((error = bus_setup_intr(dev, adapter->res_interrupt,
- INTR_TYPE_NET | INTR_FAST, em_intr_fast, adapter,
+ INTR_TYPE_NET, em_intr_fast, NULL, adapter,
&adapter->int_handler_tag)) != 0) {
device_printf(dev, "Failed to register fast interrupt "
"handler: %d\n", error);
diff --git a/sys/dev/en/if_en_pci.c b/sys/dev/en/if_en_pci.c
index 61d77e7..09ba8bc 100644
--- a/sys/dev/en/if_en_pci.c
+++ b/sys/dev/en/if_en_pci.c
@@ -277,7 +277,7 @@ en_pci_attach(device_t dev)
* Do the interrupt SETUP last just before returning
*/
error = bus_setup_intr(dev, scp->irq, INTR_TYPE_NET,
- en_intr, sc, &scp->ih);
+ NULL, en_intr, sc, &scp->ih);
if (error) {
en_reset(sc);
atm_ifdetach(sc->ifp);
diff --git a/sys/dev/ep/if_ep_eisa.c b/sys/dev/ep/if_ep_eisa.c
index 123bad7..e25a531 100644
--- a/sys/dev/ep/if_ep_eisa.c
+++ b/sys/dev/ep/if_ep_eisa.c
@@ -217,8 +217,8 @@ ep_eisa_attach(device_t dev)
device_printf(dev, "ep_attach() failed! (%d)\n", error);
goto bad;
}
- if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
- sc, &sc->ep_intrhand))) {
+ if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
+ NULL, ep_intr, sc, &sc->ep_intrhand))) {
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
goto bad;
}
diff --git a/sys/dev/ep/if_ep_isa.c b/sys/dev/ep/if_ep_isa.c
index a1c6b5a..0455c40 100644
--- a/sys/dev/ep/if_ep_isa.c
+++ b/sys/dev/ep/if_ep_isa.c
@@ -336,8 +336,8 @@ ep_isa_attach(device_t dev)
device_printf(sc->dev, "Invalid EEPROM checksum!\n");
goto bad;
}
- if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
- sc, &sc->ep_intrhand))) {
+ if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
+ NULL, ep_intr, sc, &sc->ep_intrhand))) {
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
goto bad;
}
diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c
index 37f494b..4309358 100644
--- a/sys/dev/ep/if_ep_pccard.c
+++ b/sys/dev/ep/if_ep_pccard.c
@@ -204,7 +204,7 @@ ep_pccard_attach(device_t dev)
goto bad;
}
if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- ep_intr, sc, &sc->ep_intrhand))) {
+ NULL, ep_intr, sc, &sc->ep_intrhand))) {
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
goto bad;
}
diff --git a/sys/dev/esp/esp_sbus.c b/sys/dev/esp/esp_sbus.c
index 6e13c36..9c62d9b 100644
--- a/sys/dev/esp/esp_sbus.c
+++ b/sys/dev/esp/esp_sbus.c
@@ -691,7 +691,7 @@ espattach(struct esp_softc *esc, struct ncr53c9x_glue *gluep)
return (ENXIO);
}
if (bus_setup_intr(esc->sc_dev, esc->sc_irqres,
- INTR_TYPE_BIO|INTR_MPSAFE, ncr53c9x_intr, sc, &esc->sc_irq)) {
+ INTR_TYPE_BIO|INTR_MPSAFE, NULL, ncr53c9x_intr, sc, &esc->sc_irq)) {
device_printf(esc->sc_dev, "cannot set up interrupt\n");
error = ENXIO;
goto fail_ires;
diff --git a/sys/dev/ex/if_ex_isa.c b/sys/dev/ex/if_ex_isa.c
index 214a53e..84b71a2 100644
--- a/sys/dev/ex/if_ex_isa.c
+++ b/sys/dev/ex/if_ex_isa.c
@@ -314,7 +314,7 @@ ex_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- ex_intr, (void *)sc, &sc->ih);
+ NULL, ex_intr, (void *)sc, &sc->ih);
if (error) {
device_printf(dev, "bus_setup_intr() failed!\n");
goto bad;
diff --git a/sys/dev/ex/if_ex_pccard.c b/sys/dev/ex/if_ex_pccard.c
index 3a3cb0b..1d16463 100644
--- a/sys/dev/ex/if_ex_pccard.c
+++ b/sys/dev/ex/if_ex_pccard.c
@@ -165,7 +165,7 @@ ex_pccard_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- ex_intr, (void *)sc, &sc->ih);
+ NULL, ex_intr, (void *)sc, &sc->ih);
if (error) {
device_printf(dev, "bus_setup_intr() failed!\n");
goto bad;
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index 6916c8c..8ba31c1 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -3060,7 +3060,7 @@ fatm_attach(device_t dev)
#endif
error = bus_setup_intr(dev, sc->irqres, INTR_TYPE_NET | INTR_MPSAFE,
- fatm_intr, sc, &sc->ih);
+ NULL, fatm_intr, sc, &sc->ih);
if (error) {
if_printf(ifp, "couldn't setup irq\n");
goto fail;
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 4f48ead..c936951 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -261,6 +261,7 @@ struct fd_data {
#define FD_NOT_VALID -2
static driver_intr_t fdc_intr;
+static driver_filter_t fdc_intr_fast;
static void fdc_reset(struct fdc_data *);
SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver");
@@ -686,6 +687,14 @@ fdc_intr(void *arg)
wakeup(arg);
}
+static int
+fdc_intr_fast(void *arg)
+{
+
+ wakeup(arg);
+ return(FILTER_HANDLED);
+}
+
/*
* fdc_pio(): perform programmed IO read/write for YE PCMCIA floppy.
*/
@@ -1758,9 +1767,11 @@ fdc_attach(device_t dev)
return (error);
}
error = bus_setup_intr(dev, fdc->res_irq,
- INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE |
- ((fdc->flags & FDC_NOFAST) ? 0 : INTR_FAST),
- fdc_intr, fdc, &fdc->fdc_intr);
+ INTR_TYPE_BIO | INTR_ENTROPY |
+ ((fdc->flags & FDC_NOFAST) ? INTR_MPSAFE : 0),
+ ((fdc->flags & FDC_NOFAST) ? NULL : fdc_intr_fast),
+ ((fdc->flags & FDC_NOFAST) ? fdc_intr : NULL),
+ fdc, &fdc->fdc_intr);
if (error) {
device_printf(dev, "cannot setup interrupt\n");
return (error);
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index fc0f2dc..14d3c46 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -741,7 +741,7 @@ fe_attach (device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- fe_intr, sc, &sc->irq_handle);
+ NULL, fe_intr, sc, &sc->irq_handle);
if (error) {
if_free(ifp);
fe_release_resource(dev);
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index b5801f0..37bb2d8 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -342,7 +342,7 @@ fwohci_pci_attach(device_t self)
#else
INTR_TYPE_NET,
#endif
- (driver_intr_t *) fwohci_intr, sc, &sc->ih);
+ NULL, (driver_intr_t *) fwohci_intr, sc, &sc->ih);
#if defined(__DragonFly__) || __FreeBSD_version < 500000
/* XXX splcam() should mask this irq for sbp.c*/
err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_CAM,
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 630ffd7..a27d287 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -808,7 +808,7 @@ fxp_attach(device_t dev)
* Hook our interrupt after all initialization is complete.
*/
error = bus_setup_intr(dev, sc->fxp_res[1], INTR_TYPE_NET | INTR_MPSAFE,
- fxp_intr, sc, &sc->ih);
+ NULL, fxp_intr, sc, &sc->ih);
if (error) {
device_printf(dev, "could not setup irq\n");
ether_ifdetach(sc->ifp);
diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c
index bca56fe..cbc192c 100644
--- a/sys/dev/gem/if_gem_pci.c
+++ b/sys/dev/gem/if_gem_pci.c
@@ -210,7 +210,7 @@ gem_pci_attach(dev)
}
if (bus_setup_intr(dev, gsc->gsc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- gem_intr, sc, &gsc->gsc_ih) != 0) {
+ NULL, gem_intr, sc, &gsc->gsc_ih) != 0) {
device_printf(dev, "failed to set up interrupt\n");
gem_detach(sc);
goto fail_ires;
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c
index 37263f5..8532764 100644
--- a/sys/dev/hatm/if_hatm.c
+++ b/sys/dev/hatm/if_hatm.c
@@ -1951,7 +1951,7 @@ hatm_attach(device_t dev)
#endif
error = bus_setup_intr(dev, sc->irqres, sc->mpsafe | INTR_TYPE_NET,
- hatm_intr, &sc->irq_0, &sc->ih);
+ NULL, hatm_intr, &sc->irq_0, &sc->ih);
if (error != 0) {
device_printf(dev, "could not setup interrupt\n");
hatm_detach(dev);
diff --git a/sys/dev/hfa/hfa_pci.c b/sys/dev/hfa/hfa_pci.c
index fb28478..382f486 100644
--- a/sys/dev/hfa/hfa_pci.c
+++ b/sys/dev/hfa/hfa_pci.c
@@ -161,7 +161,7 @@ hfa_pci_attach (dev)
* Map interrupt in
*/
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- hfa_intr, sc, &sc->irq_ih);
+ NULL, hfa_intr, sc, &sc->irq_ih);
if (error) {
device_printf(dev, "Interrupt handler setup failed.\n");
goto fail;
diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c
index de92ce7..6f2666f 100644
--- a/sys/dev/hifn/hifn7751.c
+++ b/sys/dev/hifn/hifn7751.c
@@ -530,7 +530,7 @@ hifn_attach(device_t dev)
* so make sure the IRQ is marked appropriately.
*/
if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
- hifn_intr, sc, &sc->sc_intrhand)) {
+ NULL, hifn_intr, sc, &sc->sc_intrhand)) {
device_printf(dev, "could not setup interrupt\n");
goto fail_intr2;
}
diff --git a/sys/dev/hme/if_hme_pci.c b/sys/dev/hme/if_hme_pci.c
index ade6e19..ac77560 100644
--- a/sys/dev/hme/if_hme_pci.c
+++ b/sys/dev/hme/if_hme_pci.c
@@ -351,7 +351,7 @@ fail_children:
}
if ((error = bus_setup_intr(dev, hsc->hsc_ires, INTR_TYPE_NET |
- INTR_MPSAFE, hme_intr, sc, &hsc->hsc_ih)) != 0) {
+ INTR_MPSAFE, NULL, hme_intr, sc, &hsc->hsc_ih)) != 0) {
device_printf(dev, "couldn't establish interrupt\n");
hme_detach(sc);
goto fail_ires;
diff --git a/sys/dev/hme/if_hme_sbus.c b/sys/dev/hme/if_hme_sbus.c
index 300abc1..0e8eb45 100644
--- a/sys/dev/hme/if_hme_sbus.c
+++ b/sys/dev/hme/if_hme_sbus.c
@@ -269,7 +269,7 @@ hme_sbus_attach(device_t dev)
}
if ((error = bus_setup_intr(dev, hsc->hsc_ires, INTR_TYPE_NET |
- INTR_MPSAFE, hme_intr, sc, &hsc->hsc_ih)) != 0) {
+ INTR_MPSAFE, NULL, hme_intr, sc, &hsc->hsc_ih)) != 0) {
device_printf(dev, "couldn't establish interrupt\n");
hme_detach(sc);
goto fail_ires;
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c
index 5361f8b..0831743 100644
--- a/sys/dev/hptmv/entry.c
+++ b/sys/dev/hptmv/entry.c
@@ -1929,7 +1929,7 @@ hpt_attach(device_t dev)
return(ENXIO);
}
- if(bus_setup_intr(pAdapter->hpt_dev, pAdapter->hpt_irq, INTR_TYPE_CAM, hpt_intr, pAdapter, &pAdapter->hpt_intr))
+ if(bus_setup_intr(pAdapter->hpt_dev, pAdapter->hpt_irq, INTR_TYPE_CAM, NULL, hpt_intr, pAdapter, &pAdapter->hpt_intr))
{
hpt_printk(("can't set up interrupt\n"));
free(pAdapter, M_DEVBUF);
diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c
index a12f287..9c60df7 100644
--- a/sys/dev/ichsmb/ichsmb.c
+++ b/sys/dev/ichsmb/ichsmb.c
@@ -125,7 +125,7 @@ ichsmb_attach(device_t dev)
/* Set up interrupt handler */
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC,
- ichsmb_device_intr, sc, &sc->irq_handle);
+ NULL, ichsmb_device_intr, sc, &sc->irq_handle);
if (error != 0) {
device_printf(dev, "can't setup irq\n");
goto fail;
diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c
index 864b170..c1a0b40 100644
--- a/sys/dev/ida/ida_eisa.c
+++ b/sys/dev/ida/ida_eisa.c
@@ -324,7 +324,7 @@ ida_eisa_attach(device_t dev)
}
error = bus_setup_intr(dev, ida->irq, INTR_TYPE_BIO | INTR_ENTROPY,
- ida_intr, ida, &ida->ih);
+ NULL, ida_intr, ida, &ida->ih);
if (error) {
device_printf(dev, "can't setup interrupt\n");
ida_free(ida);
diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c
index 3c98105..c33e235 100644
--- a/sys/dev/ida/ida_pci.c
+++ b/sys/dev/ida/ida_pci.c
@@ -298,7 +298,7 @@ ida_pci_attach(device_t dev)
return (ENOMEM);
}
error = bus_setup_intr(dev, ida->irq, INTR_TYPE_BIO | INTR_ENTROPY,
- ida_intr, ida, &ida->ih);
+ NULL, ida_intr, ida, &ida->ih);
if (error) {
device_printf(dev, "can't setup interrupt\n");
ida_free(ida);
diff --git a/sys/dev/idt/idt_pci.c b/sys/dev/idt/idt_pci.c
index 1a77c4b..07c061d 100644
--- a/sys/dev/idt/idt_pci.c
+++ b/sys/dev/idt/idt_pci.c
@@ -160,7 +160,7 @@ idt_attach(device_t dev)
goto fail;
}
- error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, nicstar_intr,
+ error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, NULL, nicstar_intr,
sc, &sc->irq_ih);
if (error) {
device_printf(dev, "could not setup irq.\n");
diff --git a/sys/dev/ie/if_ie_isa.c b/sys/dev/ie/if_ie_isa.c
index 811ea06..0b80fb6 100644
--- a/sys/dev/ie/if_ie_isa.c
+++ b/sys/dev/ie/if_ie_isa.c
@@ -270,7 +270,7 @@ ie_isa_3C507_attach (device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- ie_intr, sc, &sc->irq_ih);
+ NULL, ie_intr, sc, &sc->irq_ih);
if (error) {
device_printf(dev, "Unable to register interrupt handler\n");
goto bad;
@@ -561,7 +561,7 @@ ie_isa_ee16_attach (device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- ie_intr, sc, &sc->irq_ih);
+ NULL, ie_intr, sc, &sc->irq_ih);
if (error) {
device_printf(dev, "Unable to register interrupt handler\n");
goto bad;
@@ -773,7 +773,7 @@ ie_isa_sl_attach (device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- ie_intr, sc, &sc->irq_ih);
+ NULL, ie_intr, sc, &sc->irq_ih);
if (error) {
device_printf(dev, "Unable to register interrupt handler\n");
goto bad;
diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c
index daea1e7..dbeff0b 100644
--- a/sys/dev/iir/iir_pci.c
+++ b/sys/dev/iir/iir_pci.c
@@ -344,7 +344,7 @@ iir_pci_attach(device_t dev)
/* associate interrupt handler */
if (bus_setup_intr( dev, irq, INTR_TYPE_CAM,
- iir_intr, gdt, &ih )) {
+ NULL, iir_intr, gdt, &ih )) {
device_printf(dev, "Unable to register interrupt handler\n");
error = ENXIO;
goto err;
diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c
index a82299c..12cf3f5 100644
--- a/sys/dev/ipmi/ipmi.c
+++ b/sys/dev/ipmi/ipmi.c
@@ -845,7 +845,7 @@ ipmi_attach(device_t dev)
if (sc->ipmi_irq_res != NULL && sc->ipmi_intr != NULL) {
error = bus_setup_intr(dev, sc->ipmi_irq_res, INTR_TYPE_MISC,
- sc->ipmi_intr, sc, &sc->ipmi_irq);
+ NULL, sc->ipmi_intr, sc, &sc->ipmi_irq);
if (error) {
device_printf(dev, "can't set up interrupt\n");
return (error);
diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c
index 167c08c..9ccaf37 100644
--- a/sys/dev/ips/ips_pci.c
+++ b/sys/dev/ips/ips_pci.c
@@ -130,7 +130,8 @@ static int ips_pci_attach(device_t dev)
device_printf(dev, "irq allocation failed\n");
goto error;
}
- if(bus_setup_intr(dev, sc->irqres, INTR_TYPE_BIO|INTR_MPSAFE, sc->ips_adapter_intr, sc, &sc->irqcookie)){
+ if(bus_setup_intr(dev, sc->irqres, INTR_TYPE_BIO|INTR_MPSAFE, NULL,
+ sc->ips_adapter_intr, sc, &sc->irqcookie)){
device_printf(dev, "irq setup failed\n");
goto error;
}
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index 7534949..d9cbaf5 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -348,7 +348,7 @@ ipw_attach(device_t dev)
* Hook our interrupt after all initialization is complete.
*/
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- ipw_intr, sc, &sc->sc_ih);
+ NULL, ipw_intr, sc, &sc->sc_ih);
if (error != 0) {
device_printf(dev, "could not set up interrupt\n");
goto fail;
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index 92b8527..64dcddf 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -1170,7 +1170,7 @@ isp_pci_attach(device_t dev)
locksetup++;
#endif
- if (bus_setup_intr(dev, irq, ISP_IFLAGS, isp_pci_intr, isp, &pcs->ih)) {
+ if (bus_setup_intr(dev, irq, ISP_IFLAGS, NULL, isp_pci_intr, isp, &pcs->ih)) {
device_printf(dev, "could not setup interrupt\n");
goto bad;
}
diff --git a/sys/dev/isp/isp_sbus.c b/sys/dev/isp/isp_sbus.c
index c9a4294..6da80e5 100644
--- a/sys/dev/isp/isp_sbus.c
+++ b/sys/dev/isp/isp_sbus.c
@@ -312,7 +312,7 @@ isp_sbus_attach(device_t dev)
}
if (bus_setup_intr(dev, sbs->sbus_ires, ISP_IFLAGS,
- isp_sbus_intr, isp, &sbs->ih)) {
+ NULL, isp_sbus_intr, isp, &sbs->ih)) {
device_printf(dev, "could not setup interrupt\n");
goto bad;
}
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index e9c08c0..f504d80 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -452,7 +452,7 @@ iwi_attach(device_t dev)
* Hook our interrupt after all initialization is complete.
*/
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- iwi_intr, sc, &sc->sc_ih);
+ NULL, iwi_intr, sc, &sc->sc_ih);
if (error != 0) {
device_printf(dev, "could not set up interrupt\n");
goto fail;
diff --git a/sys/dev/ixgb/if_ixgb.c b/sys/dev/ixgb/if_ixgb.c
index 3886465..9b05c95 100644
--- a/sys/dev/ixgb/if_ixgb.c
+++ b/sys/dev/ixgb/if_ixgb.c
@@ -1268,7 +1268,7 @@ ixgb_allocate_pci_resources(struct adapter * adapter)
}
if (bus_setup_intr(dev, adapter->res_interrupt,
INTR_TYPE_NET | INTR_MPSAFE,
- (void (*) (void *))ixgb_intr, adapter,
+ NULL, (void (*) (void *))ixgb_intr, adapter,
&adapter->int_handler_tag)) {
printf("ixgb%d: Error registering interrupt handler!\n",
adapter->unit);
diff --git a/sys/dev/le/if_le_cbus.c b/sys/dev/le/if_le_cbus.c
index 63519d3..18026bd 100644
--- a/sys/dev/le/if_le_cbus.c
+++ b/sys/dev/le/if_le_cbus.c
@@ -377,7 +377,7 @@ le_cbus_attach(device_t dev)
}
error = bus_setup_intr(dev, lesc->sc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- am7990_intr, sc, &lesc->sc_ih);
+ NULL, am7990_intr, sc, &lesc->sc_ih);
if (error != 0) {
device_printf(dev, "cannot set up interrupt\n");
goto fail_am7990;
diff --git a/sys/dev/le/if_le_isa.c b/sys/dev/le/if_le_isa.c
index 957c49c..0519f5a 100644
--- a/sys/dev/le/if_le_isa.c
+++ b/sys/dev/le/if_le_isa.c
@@ -432,7 +432,7 @@ le_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, lesc->sc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- am7990_intr, sc, &lesc->sc_ih);
+ NULL, am7990_intr, sc, &lesc->sc_ih);
if (error != 0) {
device_printf(dev, "cannot set up interrupt\n");
goto fail_am7990;
diff --git a/sys/dev/le/if_le_lebuffer.c b/sys/dev/le/if_le_lebuffer.c
index 6c3d367..0895598 100644
--- a/sys/dev/le/if_le_lebuffer.c
+++ b/sys/dev/le/if_le_lebuffer.c
@@ -341,7 +341,7 @@ le_lebuffer_attach(device_t dev)
}
error = bus_setup_intr(dev, lesc->sc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- am7990_intr, sc, &lesc->sc_ih);
+ NULL, am7990_intr, sc, &lesc->sc_ih);
if (error != 0) {
device_printf(dev, "cannot set up interrupt\n");
goto fail_am7990;
diff --git a/sys/dev/le/if_le_ledma.c b/sys/dev/le/if_le_ledma.c
index 5ca435e..affd5c8 100644
--- a/sys/dev/le/if_le_ledma.c
+++ b/sys/dev/le/if_le_ledma.c
@@ -419,7 +419,7 @@ le_dma_attach(device_t dev)
}
error = bus_setup_intr(dev, lesc->sc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- am7990_intr, sc, &lesc->sc_ih);
+ NULL, am7990_intr, sc, &lesc->sc_ih);
if (error != 0) {
device_printf(dev, "cannot set up interrupt\n");
goto fail_am7990;
diff --git a/sys/dev/le/if_le_pci.c b/sys/dev/le/if_le_pci.c
index 961f85f..841ab93 100644
--- a/sys/dev/le/if_le_pci.c
+++ b/sys/dev/le/if_le_pci.c
@@ -442,7 +442,7 @@ le_pci_attach(device_t dev)
}
error = bus_setup_intr(dev, lesc->sc_ires, INTR_TYPE_NET | INTR_MPSAFE,
- am79900_intr, sc, &lesc->sc_ih);
+ NULL, am79900_intr, sc, &lesc->sc_ih);
if (error != 0) {
device_printf(dev, "cannot set up interrupt\n");
goto fail_am79900;
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 56731a8..e09134c 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -573,7 +573,7 @@ lge_attach(dev)
ether_ifattach(ifp, eaddr);
error = bus_setup_intr(dev, sc->lge_irq, INTR_TYPE_NET | INTR_MPSAFE,
- lge_intr, sc, &sc->lge_intrhand);
+ NULL, lge_intr, sc, &sc->lge_intrhand);
if (error) {
ether_ifdetach(ifp);
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index f970d31..9165fae 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -5700,7 +5700,7 @@ fbsd_attach(device_t dev)
return ENXIO;
}
if ((error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
- bsd_interrupt, sc, &sc->irq_cookie)))
+ NULL, bsd_interrupt, sc, &sc->irq_cookie)))
{
printf("%s: bus_setup_intr() failed; error %d\n", NAME_UNIT, error);
fbsd_detach(dev);
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
index b52e5d3..dcbfdd4 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -360,7 +360,7 @@ mfi_attach(struct mfi_softc *sc)
return (EINVAL);
}
if (bus_setup_intr(sc->mfi_dev, sc->mfi_irq, INTR_MPSAFE|INTR_TYPE_BIO,
- mfi_intr, sc, &sc->mfi_intr)) {
+ NULL, mfi_intr, sc, &sc->mfi_intr)) {
device_printf(sc->mfi_dev, "Cannot set up interrupt\n");
return (EINVAL);
}
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index d8cc79a..76205e1 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -364,7 +364,7 @@ mlx_attach(struct mlx_softc *sc)
device_printf(sc->mlx_dev, "can't allocate interrupt\n");
return(ENXIO);
}
- error = bus_setup_intr(sc->mlx_dev, sc->mlx_irq, INTR_TYPE_BIO | INTR_ENTROPY, mlx_intr, sc, &sc->mlx_intr);
+ error = bus_setup_intr(sc->mlx_dev, sc->mlx_irq, INTR_TYPE_BIO | INTR_ENTROPY, NULL, mlx_intr, sc, &sc->mlx_intr);
if (error) {
device_printf(sc->mlx_dev, "can't set up interrupt\n");
return(ENXIO);
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 72c8080..62052b0 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -380,7 +380,7 @@ mly_pci_attach(struct mly_softc *sc)
mly_printf(sc, "can't allocate interrupt\n");
goto fail;
}
- if (bus_setup_intr(sc->mly_dev, sc->mly_irq, INTR_TYPE_CAM | INTR_ENTROPY, mly_intr, sc, &sc->mly_intr)) {
+ if (bus_setup_intr(sc->mly_dev, sc->mly_irq, INTR_TYPE_CAM | INTR_ENTROPY, NULL, mly_intr, sc, &sc->mly_intr)) {
mly_printf(sc, "can't set up interrupt\n");
goto fail;
}
diff --git a/sys/dev/mpt/mpt_pci.c b/sys/dev/mpt/mpt_pci.c
index 47ce90b..2850d0b 100644
--- a/sys/dev/mpt/mpt_pci.c
+++ b/sys/dev/mpt/mpt_pci.c
@@ -563,7 +563,7 @@ mpt_pci_attach(device_t dev)
mpt_disable_ints(mpt);
/* Register the interrupt handler */
- if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, mpt_pci_intr,
+ if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr,
mpt, &mpt->ih)) {
device_printf(dev, "could not setup interrupt\n");
goto bad;
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index 28f6773..405be42 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -134,7 +134,7 @@ mse_common_attach(device_t dev)
}
if (bus_setup_intr(dev, sc->sc_intr,
- INTR_TYPE_TTY, mseintr, sc, &sc->sc_ih)) {
+ INTR_TYPE_TTY, NULL, mseintr, sc, &sc->sc_ih)) {
bus_release_resource(dev, SYS_RES_IOPORT, rid, sc->sc_port);
bus_release_resource(dev, SYS_RES_IRQ, rid, sc->sc_intr);
return ENXIO;
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c
index d6b10bff..d93a69f 100644
--- a/sys/dev/msk/if_msk.c
+++ b/sys/dev/msk/if_msk.c
@@ -228,7 +228,7 @@ static int msk_attach(device_t);
static int msk_detach(device_t);
static void msk_tick(void *);
-static void msk_intr(void *);
+static int msk_intr(void *);
static void msk_int_task(void *, int);
static void msk_intr_phy(struct msk_if_softc *);
static void msk_intr_gmac(struct msk_if_softc *);
@@ -1784,7 +1784,7 @@ mskc_attach(device_t dev)
device_get_nameunit(sc->msk_dev));
/* Hook interrupt last to avoid having to lock softc. */
error = bus_setup_intr(dev, sc->msk_irq[0], INTR_TYPE_NET |
- INTR_MPSAFE | INTR_FAST, msk_intr, sc, &sc->msk_intrhand[0]);
+ INTR_MPSAFE, msk_intr, NULL, sc, &sc->msk_intrhand[0]);
if (error != 0) {
device_printf(dev, "couldn't set up interrupt handler\n");
@@ -3483,7 +3483,7 @@ msk_handle_events(struct msk_softc *sc)
return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX));
}
-static void
+static int
msk_intr(void *xsc)
{
struct msk_softc *sc;
@@ -3494,10 +3494,11 @@ msk_intr(void *xsc)
/* Reading B0_Y2_SP_ISRC2 masks further interrupts. */
if (status == 0 || status == 0xffffffff) {
CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);
- return;
+ return (FILTER_STRAY);
}
taskqueue_enqueue(sc->msk_tq, &sc->msk_int_task);
+ return (FILTER_HANDLED);
}
static void
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index 6facddc..6323411 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -3024,7 +3024,7 @@ mxge_attach(device_t dev)
err = bus_setup_intr(sc->dev, sc->irq_res,
INTR_TYPE_NET | INTR_MPSAFE,
- mxge_intr, sc, &sc->ih);
+ NULL, mxge_intr, sc, &sc->ih);
if (err != 0) {
goto abort_with_rings;
}
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index b17751c..e3e08a3 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -958,7 +958,7 @@ my_attach(device_t dev)
ether_ifattach(ifp, eaddr);
error = bus_setup_intr(dev, sc->my_irq, INTR_TYPE_NET | INTR_MPSAFE,
- my_intr, sc, &sc->my_intrhand);
+ NULL, my_intr, sc, &sc->my_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c
index 1597d06..22dc827 100644
--- a/sys/dev/ncv/ncr53c500_pccard.c
+++ b/sys/dev/ncv/ncr53c500_pccard.c
@@ -246,7 +246,7 @@ ncv_pccard_attach(device_t dev)
return(ENXIO);
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- ncv_pccard_intr, (void *)sc, &sc->ncv_intrhand);
+ NULL, ncv_pccard_intr, (void *)sc, &sc->ncv_intrhand);
if (error) {
ncv_release_resource(dev);
return(error);
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c
index 5ef9480..baeb090 100644
--- a/sys/dev/nfe/if_nfe.c
+++ b/sys/dev/nfe/if_nfe.c
@@ -409,7 +409,7 @@ nfe_attach(device_t dev)
ether_ifattach(ifp, sc->eaddr);
error = bus_setup_intr(dev, sc->nfe_irq, INTR_TYPE_NET | INTR_MPSAFE,
- nfe_intr, sc, &sc->nfe_intrhand);
+ NULL, nfe_intr, sc, &sc->nfe_intrhand);
if (error) {
printf("nfe%d: couldn't set up irq\n", unit);
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index f74264f..79a8169 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -915,7 +915,7 @@ nge_attach(dev)
* Hookup IRQ last.
*/
error = bus_setup_intr(dev, sc->nge_irq, INTR_TYPE_NET | INTR_MPSAFE,
- nge_intr, sc, &sc->nge_intrhand);
+ NULL, nge_intr, sc, &sc->nge_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
goto fail;
diff --git a/sys/dev/nsp/nsp_pccard.c b/sys/dev/nsp/nsp_pccard.c
index 21141ae..718181b 100644
--- a/sys/dev/nsp/nsp_pccard.c
+++ b/sys/dev/nsp/nsp_pccard.c
@@ -187,7 +187,7 @@ nsp_pccard_attach(device_t dev)
return(ENXIO);
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- nsp_pccard_intr, (void *)sc, &sc->nsp_intrhand);
+ NULL, nsp_pccard_intr, (void *)sc, &sc->nsp_intrhand);
if (error) {
nsp_release_resource(dev);
return(error);
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c
index 8b014c6..06ca4ba 100644
--- a/sys/dev/nve/if_nve.c
+++ b/sys/dev/nve/if_nve.c
@@ -536,7 +536,7 @@ nve_attach(device_t dev)
/* Activate our interrupt handler. - attach last to avoid lock */
error = bus_setup_intr(sc->dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- nve_intr, sc, &sc->sc_ih);
+ NULL, nve_intr, sc, &sc->sc_ih);
if (error) {
device_printf(sc->dev, "couldn't set up interrupt handler\n");
goto fail;
diff --git a/sys/dev/patm/if_patm_attach.c b/sys/dev/patm/if_patm_attach.c
index b0ab9c0..940d0ac 100644
--- a/sys/dev/patm/if_patm_attach.c
+++ b/sys/dev/patm/if_patm_attach.c
@@ -442,7 +442,7 @@ patm_attach(device_t dev)
patm_debug(sc, ATTACH, "attaching interrupt handler");
error = bus_setup_intr(dev, sc->irqres, INTR_TYPE_NET | INTR_MPSAFE,
- patm_intr, sc, &sc->ih);
+ NULL, patm_intr, sc, &sc->ih);
if (error != 0) {
patm_printf(sc, "could not setup interrupt\n");
atm_ifdetach(sc->ifp);
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 45600ba..64e0a7c 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -118,10 +118,10 @@ static struct resource *pccard_alloc_resource(device_t dev,
static int pccard_release_resource(device_t dev, device_t child, int type,
int rid, struct resource *r);
static void pccard_child_detached(device_t parent, device_t dev);
-static void pccard_intr(void *arg);
+static int pccard_intr(void *arg);
static int pccard_setup_intr(device_t dev, device_t child,
- struct resource *irq, int flags, driver_intr_t *intr,
- void *arg, void **cookiep);
+ struct resource *irq, int flags, driver_filter_t *filt,
+ driver_intr_t *intr, void *arg, void **cookiep);
static int pccard_teardown_intr(device_t dev, device_t child,
struct resource *r, void *cookie);
@@ -1176,7 +1176,7 @@ pccard_child_detached(device_t parent, device_t dev)
pccard_function_disable(pf);
}
-static void
+static int
pccard_intr(void *arg)
{
struct pccard_function *pf = (struct pccard_function*) arg;
@@ -1207,13 +1207,19 @@ pccard_intr(void *arg)
else
doisr = 0;
}
- if (pf->intr_handler != NULL && doisr)
- pf->intr_handler(pf->intr_handler_arg);
+ if (doisr) {
+ if (pf->filt_handler != NULL)
+ pf->filt_handler(pf->intr_handler_arg);
+ else
+ pf->intr_handler(pf->intr_handler_arg);
+ }
+ return (FILTER_HANDLED);
}
static int
pccard_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 *filt, driver_intr_t *intr, void *arg,
+ void **cookiep)
{
struct pccard_softc *sc = PCCARD_SOFTC(dev);
struct pccard_ivar *ivar = PCCARD_IVAR(child);
@@ -1222,10 +1228,17 @@ pccard_setup_intr(device_t dev, device_t child, struct resource *irq,
if (pf->intr_handler != NULL)
panic("Only one interrupt handler per function allowed");
- err = bus_generic_setup_intr(dev, child, irq, flags, pccard_intr,
- pf, cookiep);
+ if (filt != NULL && intr != NULL)
+ return (EINVAL);
+ if (filt != NULL)
+ err = bus_generic_setup_intr(dev, child, irq, flags,
+ pccard_intr, NULL, pf, cookiep);
+ else
+ err = bus_generic_setup_intr(dev, child, irq, flags,
+ NULL, (driver_intr_t *)pccard_intr, pf, cookiep);
if (err != 0)
return (err);
+ pf->filt_handler = filt;
pf->intr_handler = intr;
pf->intr_handler_arg = arg;
pf->intr_handler_cookie = *cookiep;
diff --git a/sys/dev/pccard/pccardvarp.h b/sys/dev/pccard/pccardvarp.h
index 66441c0..892a028 100644
--- a/sys/dev/pccard/pccardvarp.h
+++ b/sys/dev/pccard/pccardvarp.h
@@ -112,6 +112,7 @@ struct pccard_function {
bus_addr_t pf_mfc_iobase;
bus_addr_t pf_mfc_iomax;
int pf_flags;
+ driver_filter_t *filt_handler;
driver_intr_t *intr_handler;
void *intr_handler_arg;
void *intr_handler_cookie;
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index fd11678..d412e3a 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -358,7 +358,8 @@ cbb_detach(device_t brdev)
int
cbb_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 *filt, driver_intr_t *intr, void *arg,
+ void **cookiep)
{
struct cbb_intrhand *ih;
struct cbb_softc *sc = device_get_softc(dev);
@@ -370,7 +371,7 @@ cbb_setup_intr(device_t dev, device_t child, struct resource *irq,
* least common denominator until the base system supports mixing
* and matching better.
*/
- if ((flags & INTR_FAST) != 0)
+ if (filt != NULL)
return (EINVAL);
ih = malloc(sizeof(struct cbb_intrhand), M_DEVBUF, M_NOWAIT);
if (ih == NULL)
@@ -384,7 +385,7 @@ cbb_setup_intr(device_t dev, device_t child, struct resource *irq,
* XXX for now that's all we need to do.
*/
err = BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags,
- cbb_func_intr, ih, &ih->cookie);
+ NULL, cbb_func_intr, ih, &ih->cookie);
if (err != 0) {
free(ih, M_DEVBUF);
return (err);
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index ec72767..65b28f7 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -400,7 +400,7 @@ cbb_pci_attach(device_t brdev)
}
if (bus_setup_intr(brdev, sc->irq_res, INTR_TYPE_AV | INTR_MPSAFE,
- cbb_pci_intr, sc, &sc->intrhand)) {
+ NULL, cbb_pci_intr, sc, &sc->intrhand)) {
device_printf(brdev, "couldn't establish interrupt\n");
goto err;
}
diff --git a/sys/dev/pccbb/pccbbvar.h b/sys/dev/pccbb/pccbbvar.h
index 32bd0fe..15ea0a0 100644
--- a/sys/dev/pccbb/pccbbvar.h
+++ b/sys/dev/pccbb/pccbbvar.h
@@ -136,7 +136,8 @@ int cbb_release_resource(device_t brdev, device_t child,
int type, int rid, struct resource *r);
int cbb_resume(device_t self);
int cbb_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 *filt, driver_intr_t *intr, void *arg,
+ void **cookiep);
int cbb_suspend(device_t self);
int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq,
void *cookie);
diff --git a/sys/dev/pcf/envctrl.c b/sys/dev/pcf/envctrl.c
index a567cb7..868c553 100644
--- a/sys/dev/pcf/envctrl.c
+++ b/sys/dev/pcf/envctrl.c
@@ -135,7 +135,7 @@ envctrl_attach(device_t dev)
rv = bus_setup_intr(dev, sc->res_irq,
INTR_TYPE_NET /* | INTR_ENTROPY */,
- pcf_intr, sc, &sc->intr_cookie);
+ NULL, pcf_intr, sc, &sc->intr_cookie);
if (rv) {
device_printf(dev, "could not setup IRQ\n");
goto error;
diff --git a/sys/dev/pcf/pcf_ebus.c b/sys/dev/pcf/pcf_ebus.c
index 46511a0..14deff8 100644
--- a/sys/dev/pcf/pcf_ebus.c
+++ b/sys/dev/pcf/pcf_ebus.c
@@ -194,7 +194,7 @@ pcf_ebus_attach(device_t dev)
if (sc->res_irq) {
rv = bus_setup_intr(dev, sc->res_irq,
- INTR_TYPE_NET /* | INTR_ENTROPY */, pcf_intr, sc,
+ INTR_TYPE_NET /* | INTR_ENTROPY */, NULL, pcf_intr, sc,
&sc->intr_cookie);
if (rv) {
device_printf(dev, "could not setup IRQ\n");
diff --git a/sys/dev/pcf/pcf_isa.c b/sys/dev/pcf/pcf_isa.c
index 34ce67d..2850d54 100644
--- a/sys/dev/pcf/pcf_isa.c
+++ b/sys/dev/pcf/pcf_isa.c
@@ -155,7 +155,7 @@ pcf_isa_attach(device_t dev)
if (sc->res_irq) {
rv = bus_setup_intr(dev, sc->res_irq,
INTR_TYPE_NET /* | INTR_ENTROPY */,
- pcf_intr, sc, &sc->intr_cookie);
+ NULL, pcf_intr, sc, &sc->intr_cookie);
if (rv) {
device_printf(dev, "could not setup IRQ\n");
goto error;
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 7d94eea..dfee00d 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 e968aa5..1986d56 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 53421a2..40851d6 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 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
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index 5d4e68d..4cb1b2a 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1822,7 +1822,7 @@ ppc_attach(device_t dev)
if (ppc->res_irq) {
/* default to the tty mask for registration */ /* XXX */
if (bus_setup_intr(dev, ppc->res_irq, INTR_TYPE_TTY,
- ppcintr, dev, &ppc->intr_cookie) == 0) {
+ NULL, ppcintr, dev, &ppc->intr_cookie) == 0) {
/* remember the ppcintr is registered */
ppc->ppc_registered = 1;
@@ -1963,7 +1963,7 @@ ppc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val)
*/
int
ppc_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 ppc_data *ppc = DEVTOSOFTC(bus);
@@ -1985,7 +1985,7 @@ ppc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
/* pass registration to the upper layer, ignore the incoming resource */
return (BUS_SETUP_INTR(device_get_parent(bus), child,
- r, flags, ihand, arg, cookiep));
+ r, flags, filt, ihand, arg, cookiep));
}
/*
@@ -2006,7 +2006,7 @@ ppc_teardown_intr(device_t bus, device_t child, struct resource *r, void *ih)
/* default to the tty mask for registration */ /* XXX */
if (ppc->ppc_irq &&
!(error = BUS_SETUP_INTR(parent, bus, ppc->res_irq,
- INTR_TYPE_TTY, ppcintr, bus, &ppc->intr_cookie))) {
+ INTR_TYPE_TTY, NULL, ppcintr, bus, &ppc->intr_cookie))) {
/* remember the ppcintr is registered */
ppc->ppc_registered = 1;
diff --git a/sys/dev/ppc/ppcvar.h b/sys/dev/ppc/ppcvar.h
index b7d1643..b8723bc 100644
--- a/sys/dev/ppc/ppcvar.h
+++ b/sys/dev/ppc/ppcvar.h
@@ -40,7 +40,7 @@ u_char ppc_io(device_t, int, u_char *, int, u_char);
int ppc_exec_microseq(device_t, struct ppb_microseq **);
int ppc_setup_intr(device_t, device_t, struct resource *, int,
- void (*)(void *), void *, void **);
+ driver_filter_t *filt, void (*)(void *), void *, void **);
int ppc_teardown_intr(device_t, device_t, struct resource *, void *);
void ppc_reset_epp(device_t);
void ppc_ecp_sync(device_t);
diff --git a/sys/dev/pst/pst-iop.c b/sys/dev/pst/pst-iop.c
index 1b017fd..d4e83f0 100644
--- a/sys/dev/pst/pst-iop.c
+++ b/sys/dev/pst/pst-iop.c
@@ -159,7 +159,7 @@ iop_attach(void *arg)
/* setup and enable interrupts */
bus_setup_intr(sc->dev, sc->r_irq, INTR_TYPE_BIO|INTR_ENTROPY|INTR_MPSAFE,
- iop_intr, sc, &sc->handle);
+ NULL, iop_intr, sc, &sc->handle);
sc->reg->oqueue_intr_mask = 0x0;
}
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index a3da606..042cbe8 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -59,7 +59,7 @@ struct puc_port {
int p_hasintr:1;
- driver_intr_t *p_ih;
+ driver_filter_t *p_ih;
serdev_intr_t *p_ihsrc[PUC_ISRCCNT];
void *p_iharg;
@@ -125,7 +125,7 @@ puc_get_bar(struct puc_softc *sc, int rid)
return (bar);
}
-static void
+static int
puc_intr(void *arg)
{
struct puc_port *port;
@@ -183,7 +183,9 @@ puc_intr(void *arg)
if (port->p_ihsrc[i] != NULL)
(*port->p_ihsrc[i])(port->p_iharg);
}
+ return (FILTER_HANDLED);
}
+ return (FILTER_STRAY);
}
int
@@ -312,11 +314,11 @@ puc_bfe_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, puc_intr, sc, &sc->sc_icookie);
+ INTR_TYPE_TTY, puc_intr, NULL, sc, &sc->sc_icookie);
if (error)
error = bus_setup_intr(dev, sc->sc_ires,
- INTR_TYPE_TTY | INTR_MPSAFE, puc_intr, sc,
- &sc->sc_icookie);
+ INTR_TYPE_TTY | INTR_MPSAFE, NULL,
+ (driver_intr_t *)puc_intr, sc, &sc->sc_icookie);
else
sc->sc_fastintr = 1;
@@ -583,7 +585,7 @@ puc_bus_get_resource(device_t dev, device_t child, int type, int rid,
int
puc_bus_setup_intr(device_t dev, device_t child, struct resource *res,
- int flags, void (*ihand)(void *), void *arg, void **cookiep)
+ int flags, driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep)
{
struct puc_port *port;
struct puc_softc *sc;
@@ -602,7 +604,7 @@ puc_bus_setup_intr(device_t dev, device_t child, struct resource *res,
port = device_get_ivars(child);
KASSERT(port != NULL, ("%s %d", __func__, __LINE__));
- if (ihand == NULL || cookiep == NULL || res != port->p_ires)
+ if (filt == NULL || cookiep == NULL || res != port->p_ires)
return (EINVAL);
if (rman_get_device(port->p_ires) != originator)
return (ENXIO);
@@ -624,16 +626,16 @@ puc_bus_setup_intr(device_t dev, device_t child, struct resource *res,
}
if (!serdev)
return (BUS_SETUP_INTR(device_get_parent(dev), originator,
- sc->sc_ires, flags, ihand, arg, cookiep));
+ sc->sc_ires, flags, filt, ihand, arg, cookiep));
/* We demand that serdev devices use fast interrupts. */
- if (!(flags & INTR_FAST))
+ if (filt == NULL)
return (ENXIO);
sc->sc_serdevs |= 1UL << (port->p_nr - 1);
port->p_hasintr = 1;
- port->p_ih = ihand;
+ port->p_ih = filt;
port->p_iharg = arg;
*cookiep = port;
diff --git a/sys/dev/puc/puc_bfe.h b/sys/dev/puc/puc_bfe.h
index 199ba53..f6d69c4 100644
--- a/sys/dev/puc/puc_bfe.h
+++ b/sys/dev/puc/puc_bfe.h
@@ -88,7 +88,7 @@ int puc_bus_get_resource(device_t, device_t, int, int, u_long *, u_long *);
int puc_bus_read_ivar(device_t, device_t, int, uintptr_t *);
int puc_bus_release_resource(device_t, device_t, int, int, struct resource *);
int puc_bus_setup_intr(device_t, device_t, struct resource *, int,
- driver_intr_t *, void *, void **);
+ driver_filter_t *, driver_intr_t *, void *, void **);
int puc_bus_teardown_intr(device_t, device_t, struct resource *, void *);
#endif /* _DEV_PUC_BFE_H_ */
diff --git a/sys/dev/ral/if_ral_pci.c b/sys/dev/ral/if_ral_pci.c
index f1cc23c..3d9976d 100644
--- a/sys/dev/ral/if_ral_pci.c
+++ b/sys/dev/ral/if_ral_pci.c
@@ -209,7 +209,7 @@ ral_pci_attach(device_t dev)
* Hook our interrupt after all initialization is complete.
*/
error = bus_setup_intr(dev, psc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- psc->sc_opns->intr, psc, &psc->sc_ih);
+ NULL, psc->sc_opns->intr, psc, &psc->sc_ih);
if (error != 0) {
device_printf(dev, "could not set up interrupt\n");
return error;
diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c
index 8b7d140..1477c84 100644
--- a/sys/dev/ray/if_ray.c
+++ b/sys/dev/ray/if_ray.c
@@ -3749,7 +3749,7 @@ ray_res_alloc_irq(struct ray_softc *sc)
return (ENOMEM);
}
if ((error = bus_setup_intr(sc->dev, sc->irq_res, INTR_TYPE_NET,
- ray_intr, sc, &sc->irq_handle)) != 0) {
+ NULL, ray_intr, sc, &sc->irq_handle)) != 0) {
RAY_PRINTF(sc, "Failed to setup irq");
return (error);
}
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 1da5067..0c11358 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -304,8 +304,8 @@ rc_attach(device_t dev)
ttycreate(tp, TS_CALLOUT, "m%d", chan + base);
}
- error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_TTY, rc_intr, sc,
- &sc->sc_hwicookie);
+ error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_TTY, NULL, rc_intr,
+ sc, &sc->sc_hwicookie);
if (error) {
device_printf(dev, "failed to register interrupt handler\n");
goto fail;
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 6ac6519..d3328e0 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -241,7 +241,7 @@ static void re_txeof (struct rl_softc *);
static void re_poll (struct ifnet *, enum poll_cmd, int);
static void re_poll_locked (struct ifnet *, enum poll_cmd, int);
#endif
-static void re_intr (void *);
+static int re_intr (void *);
static void re_tick (void *);
static void re_tx_task (void *, int);
static void re_int_task (void *, int);
@@ -1318,8 +1318,8 @@ re_attach(dev)
#endif
/* Hook interrupt last to avoid having to lock softc */
- error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE |
- INTR_FAST, re_intr, sc, &sc->rl_intrhand);
+ error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE,
+ re_intr, NULL, sc, &sc->rl_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
@@ -1927,7 +1927,7 @@ re_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count)
}
#endif /* DEVICE_POLLING */
-static void
+static int
re_intr(arg)
void *arg;
{
@@ -1938,12 +1938,12 @@ re_intr(arg)
status = CSR_READ_2(sc, RL_ISR);
if (status == 0xFFFF || (status & RL_INTRS_CPLUS) == 0)
- return;
+ return (FILTER_STRAY);
CSR_WRITE_2(sc, RL_IMR, 0);
taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_inttask);
- return;
+ return (FILTER_HANDLED);
}
static void
diff --git a/sys/dev/rr232x/osm_bsd.c b/sys/dev/rr232x/osm_bsd.c
index e93b9ba..1e77fbf 100644
--- a/sys/dev/rr232x/osm_bsd.c
+++ b/sys/dev/rr232x/osm_bsd.c
@@ -1131,7 +1131,7 @@ static void hpt_final_init(void *dummy)
}
if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM,
- hpt_pci_intr, vbus_ext, &hba->irq_handle))
+ NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle))
{
os_printk("can't set up interrupt");
return ;
diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c
index ff0a029..7551e14 100644
--- a/sys/dev/safe/safe.c
+++ b/sys/dev/safe/safe.c
@@ -265,7 +265,7 @@ safe_attach(device_t dev)
* so make sure the IRQ is mapped appropriately.
*/
if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
- safe_intr, sc, &sc->sc_ih)) {
+ NULL, safe_intr, sc, &sc->sc_ih)) {
device_printf(dev, "could not establish interrupt\n");
goto bad2;
}
diff --git a/sys/dev/sbni/if_sbni_isa.c b/sys/dev/sbni/if_sbni_isa.c
index 3565829..cacb94f 100644
--- a/sys/dev/sbni/if_sbni_isa.c
+++ b/sys/dev/sbni/if_sbni_isa.c
@@ -123,7 +123,7 @@ sbni_attach_isa(device_t dev)
printf(" irq %ld\n", rman_get_start(sc->irq_res));
error = bus_setup_intr(
dev, sc->irq_res, INTR_TYPE_NET,
- sbni_intr, sc, &sc->irq_handle);
+ NULL, sbni_intr, sc, &sc->irq_handle);
if (error) {
printf("sbni%d: bus_setup_intr\n", next_sbni_unit);
bus_release_resource(
diff --git a/sys/dev/sbni/if_sbni_pci.c b/sys/dev/sbni/if_sbni_pci.c
index 92e864e..6aac792 100644
--- a/sys/dev/sbni/if_sbni_pci.c
+++ b/sys/dev/sbni/if_sbni_pci.c
@@ -137,7 +137,7 @@ sbni_pci_attach(device_t dev)
if (sc->irq_res) {
printf(" irq %ld\n", rman_get_start(sc->irq_res));
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- sbni_intr, sc, &sc->irq_handle);
+ NULL, sbni_intr, sc, &sc->irq_handle);
if (error) {
printf("sbni%d: bus_setup_intr\n", next_sbni_unit);
goto attach_failed;
diff --git a/sys/dev/sbsh/if_sbsh.c b/sys/dev/sbsh/if_sbsh.c
index c23f889..3c515f5 100644
--- a/sys/dev/sbsh/if_sbsh.c
+++ b/sys/dev/sbsh/if_sbsh.c
@@ -256,7 +256,7 @@ sbsh_attach(device_t dev)
init_card(sc);
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
- sbsh_intr, sc, &sc->intr_hand);
+ NULL, sbsh_intr, sc, &sc->intr_hand);
if (error) {
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res);
bus_release_resource(dev, SYS_RES_MEMORY,
diff --git a/sys/dev/scc/scc_bfe.h b/sys/dev/scc/scc_bfe.h
index 0107eae..5e7cc83 100644
--- a/sys/dev/scc/scc_bfe.h
+++ b/sys/dev/scc/scc_bfe.h
@@ -76,7 +76,7 @@ struct scc_mode {
int m_probed:1;
int m_sysdev:1;
- driver_intr_t *ih;
+ driver_filter_t *ih;
serdev_intr_t *ih_src[SCC_ISRCCNT];
void *ih_arg;
};
@@ -146,7 +146,7 @@ int scc_bus_get_resource(device_t, device_t, int, int, u_long *, u_long *);
int scc_bus_read_ivar(device_t, device_t, int, uintptr_t *);
int scc_bus_release_resource(device_t, device_t, int, int, struct resource *);
int scc_bus_setup_intr(device_t, device_t, struct resource *, int,
- void (*)(void *), void *, void **);
+ driver_filter_t *, void (*)(void *), void *, void **);
int scc_bus_teardown_intr(device_t, device_t, struct resource *, void *);
#endif /* _DEV_SCC_BFE_H_ */
diff --git a/sys/dev/scc/scc_core.c b/sys/dev/scc/scc_core.c
index 17be686..1aa7549 100644
--- a/sys/dev/scc/scc_core.c
+++ b/sys/dev/scc/scc_core.c
@@ -50,7 +50,7 @@ char scc_driver_name[] = "scc";
MALLOC_DEFINE(M_SCC, "SCC", "SCC driver");
-static void
+static int
scc_bfe_intr(void *arg)
{
struct scc_softc *sc = arg;
@@ -88,7 +88,9 @@ scc_bfe_intr(void *arg)
else
SCC_ICLEAR(sc, ch);
}
+ return (FILTER_HANDLED);
}
+ return (FILTER_STRAY);
}
int
@@ -217,12 +219,12 @@ scc_bfe_attach(device_t dev)
if (ch->ch_ires == NULL)
continue;
error = bus_setup_intr(dev, ch->ch_ires,
- INTR_TYPE_TTY | INTR_FAST, scc_bfe_intr, sc,
+ INTR_TYPE_TTY, scc_bfe_intr, NULL, sc,
&ch->ch_icookie);
if (error) {
error = bus_setup_intr(dev, ch->ch_ires,
- INTR_TYPE_TTY | INTR_MPSAFE, scc_bfe_intr, sc,
- &ch->ch_icookie);
+ INTR_TYPE_TTY | INTR_MPSAFE, NULL,
+ (driver_intr_t *)scc_bfe_intr, sc, &ch->ch_icookie);
} else
sc->sc_fastintr = 1;
@@ -495,7 +497,7 @@ scc_bus_release_resource(device_t dev, device_t child, int type, int rid,
int
scc_bus_setup_intr(device_t dev, 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)
{
struct scc_chan *ch;
struct scc_mode *m;
@@ -506,14 +508,14 @@ scc_bus_setup_intr(device_t dev, device_t child, struct resource *r, int flags,
return (EINVAL);
/* Interrupt handlers must be FAST or MPSAFE. */
- if ((flags & (INTR_FAST|INTR_MPSAFE)) == 0)
+ if (filt == NULL && !(flags & INTR_MPSAFE))
return (EINVAL);
sc = device_get_softc(dev);
if (sc->sc_polled)
return (ENXIO);
- if (sc->sc_fastintr && !(flags & INTR_FAST)) {
+ if (sc->sc_fastintr && filt == NULL) {
sc->sc_fastintr = 0;
for (c = 0; c < sc->sc_class->cl_channels; c++) {
ch = &sc->sc_chan[c];
@@ -521,15 +523,15 @@ scc_bus_setup_intr(device_t dev, device_t child, struct resource *r, int flags,
continue;
bus_teardown_intr(dev, ch->ch_ires, ch->ch_icookie);
bus_setup_intr(dev, ch->ch_ires,
- INTR_TYPE_TTY | INTR_MPSAFE, scc_bfe_intr, sc,
- &ch->ch_icookie);
+ INTR_TYPE_TTY | INTR_MPSAFE, NULL,
+ (driver_intr_t *)scc_bfe_intr, sc, &ch->ch_icookie);
}
}
m = device_get_ivars(child);
m->m_hasintr = 1;
- m->m_fastintr = (flags & INTR_FAST) ? 1 : 0;
- m->ih = ihand;
+ m->m_fastintr = (filt != NULL) ? 1 : 0;
+ m->ih = (filt != NULL) ? filt : (driver_filter_t *)ihand;
m->ih_arg = arg;
i = 0, isrc = SER_INT_OVERRUN;
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index a308e40..c76f4d3 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -784,7 +784,7 @@ sf_attach(dev)
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->sf_irq, INTR_TYPE_NET | INTR_MPSAFE,
- sf_intr, sc, &sc->sf_intrhand);
+ NULL, sf_intr, sc, &sc->sf_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 834e8eb..006eefc 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -263,7 +263,7 @@ static void comclose(struct tty *tp);
static int comopen(struct tty *tp, struct cdev *dev);
static void sioinput(struct com_s *com);
static void siointr1(struct com_s *com);
-static void siointr(void *arg);
+static int siointr(void *arg);
static int commodem(struct tty *tp, int sigon, int sigoff);
static int comparam(struct tty *tp, struct termios *t);
static void siopoll(void *);
@@ -1075,12 +1075,13 @@ determined_type: ;
com->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
if (com->irqres) {
ret = bus_setup_intr(dev, com->irqres,
- INTR_TYPE_TTY | INTR_FAST,
- siointr, com, &com->cookie);
+ INTR_TYPE_TTY,
+ siointr, NULL, com,
+ &com->cookie);
if (ret) {
ret = bus_setup_intr(dev,
com->irqres, INTR_TYPE_TTY,
- siointr, com, &com->cookie);
+ NULL, (driver_intr_t *)siointr, com, &com->cookie);
if (ret == 0)
device_printf(dev, "unable to activate interrupt in fast mode - using normal mode\n");
}
@@ -1378,7 +1379,7 @@ sioinput(com)
outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
}
-static void
+static int
siointr(arg)
void *arg;
{
@@ -1422,6 +1423,7 @@ siointr(arg)
} while (possibly_more_intrs);
mtx_unlock_spin(&sio_lock);
#endif /* COM_MULTIPORT */
+ return(FILTER_HANDLED);
}
static struct timespec siots[8];
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index 861707f..83ec4b7 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -1799,7 +1799,7 @@ vpdfailed:
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->sk_res[1], INTR_TYPE_NET|INTR_MPSAFE,
- sk_intr, sc, &sc->sk_intrhand);
+ NULL, sk_intr, sc, &sc->sk_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c
index 3845bf3..42da0dd 100644
--- a/sys/dev/sn/if_sn.c
+++ b/sys/dev/sn/if_sn.c
@@ -218,7 +218,8 @@ sn_attach(device_t dev)
* during startup to avoid LORs in the network layer.
*/
if ((err = bus_setup_intr(dev, sc->irq_res,
- INTR_TYPE_NET | INTR_MPSAFE, sn_intr, sc, &sc->intrhand)) != 0) {
+ INTR_TYPE_NET | INTR_MPSAFE, NULL, sn_intr, sc,
+ &sc->intrhand)) != 0) {
sn_detach(dev);
return err;
}
diff --git a/sys/dev/snc/if_snc_cbus.c b/sys/dev/snc/if_snc_cbus.c
index 1b9ef3e..f280de3 100644
--- a/sys/dev/snc/if_snc_cbus.c
+++ b/sys/dev/snc/if_snc_cbus.c
@@ -190,7 +190,7 @@ snc_isa_attach(dev)
snc_alloc_irq(dev, 0, 0);
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- sncintr, sc, &sc->irq_handle);
+ NULL, sncintr, sc, &sc->irq_handle);
if (error) {
printf("snc_isa_attach: bus_setup_intr() failed\n");
snc_release_resources(dev);
diff --git a/sys/dev/snc/if_snc_pccard.c b/sys/dev/snc/if_snc_pccard.c
index ccc0760..5a0a2d5 100644
--- a/sys/dev/snc/if_snc_pccard.c
+++ b/sys/dev/snc/if_snc_pccard.c
@@ -135,7 +135,7 @@ snc_pccard_attach(device_t dev)
snc_alloc_irq(dev, 0, 0);
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- sncintr, sc, &sc->irq_handle);
+ NULL, sncintr, sc, &sc->irq_handle);
if (error) {
printf("snc_isa_attach: bus_setup_intr() failed\n");
snc_release_resources(dev);
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
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index 45c764e..1b6b4f3 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -390,7 +390,7 @@ sr_attach(device_t device)
sr_init_sca(hc);
if (bus_setup_intr(device, hc->res_irq,
- INTR_TYPE_NET, srintr, hc, &hc->intr_cookie) != 0)
+ INTR_TYPE_NET, NULL, srintr, hc, &hc->intr_cookie) != 0)
goto errexit;
/*
diff --git a/sys/dev/stg/tmc18c30_isa.c b/sys/dev/stg/tmc18c30_isa.c
index 7165a81..6d90613 100644
--- a/sys/dev/stg/tmc18c30_isa.c
+++ b/sys/dev/stg/tmc18c30_isa.c
@@ -97,7 +97,7 @@ stg_isa_attach(device_t dev)
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- stg_intr, (void *)sc, &sc->stg_intrhand);
+ NULL, stg_intr, (void *)sc, &sc->stg_intrhand);
if (error) {
stg_release_resource(dev);
return(error);
diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c
index 5e1be11..079cfed 100644
--- a/sys/dev/stg/tmc18c30_pccard.c
+++ b/sys/dev/stg/tmc18c30_pccard.c
@@ -108,7 +108,7 @@ stg_pccard_attach(device_t dev)
return(ENXIO);
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- stg_intr, (void *)sc, &sc->stg_intrhand);
+ NULL, stg_intr, (void *)sc, &sc->stg_intrhand);
if (error) {
stg_release_resource(dev);
return(error);
diff --git a/sys/dev/stg/tmc18c30_pci.c b/sys/dev/stg/tmc18c30_pci.c
index 1edda5a..08443d0 100644
--- a/sys/dev/stg/tmc18c30_pci.c
+++ b/sys/dev/stg/tmc18c30_pci.c
@@ -101,7 +101,7 @@ stg_pci_attach(device_t dev)
/* XXXX remove INTR_ENTROPY below for MFC */
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY,
- stg_intr, (void *)sc, &sc->stg_intrhand);
+ NULL, stg_intr, (void *)sc, &sc->stg_intrhand);
if (error) {
stg_release_resource(dev);
return(error);
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index 61b5357..451ee12 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -809,7 +809,7 @@ stge_attach(device_t dev)
* Hookup IRQ
*/
error = bus_setup_intr(dev, sc->sc_res[1], INTR_TYPE_NET | INTR_MPSAFE,
- stge_intr, sc, &sc->sc_ih);
+ NULL, stge_intr, sc, &sc->sc_ih);
if (error != 0) {
ether_ifdetach(ifp);
device_printf(sc->sc_dev, "couldn't set up IRQ\n");
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 0b258fd..0317a52 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -8954,7 +8954,7 @@ static int sym_cam_attach(hcb_p np)
* Establish our interrupt handler.
*/
err = bus_setup_intr(np->device, np->irq_res,
- INTR_TYPE_CAM | INTR_ENTROPY, sym_intr, np,
+ INTR_TYPE_CAM | INTR_ENTROPY, NULL, sym_intr, np,
&np->intr);
if (err) {
device_printf(np->device, "bus_setup_intr() failed: %d\n",
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index b479811..634e611 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -2547,7 +2547,7 @@ ti_attach(dev)
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->ti_irq, INTR_TYPE_NET|INTR_MPSAFE,
- ti_intr, sc, &sc->ti_intrhand);
+ NULL, ti_intr, sc, &sc->ti_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c
index 10f5470..31cad43 100644
--- a/sys/dev/trm/trm.c
+++ b/sys/dev/trm/trm.c
@@ -3596,7 +3596,7 @@ trm_attach(device_t dev)
RF_SHAREABLE | RF_ACTIVE);
if (pACB->irq == NULL ||
bus_setup_intr(dev, pACB->irq,
- INTR_TYPE_CAM, trm_Interrupt, pACB, &pACB->ih)) {
+ INTR_TYPE_CAM, NULL, trm_Interrupt, pACB, &pACB->ih)) {
printf("trm%d: register Interrupt handler error!\n", unit);
goto bad;
}
diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c
index f8d972a..1bf3b7a 100644
--- a/sys/dev/twa/tw_osl_freebsd.c
+++ b/sys/dev/twa/tw_osl_freebsd.c
@@ -174,9 +174,11 @@ static TW_INT32 twa_attach(device_t dev);
static TW_INT32 twa_detach(device_t dev);
static TW_INT32 twa_shutdown(device_t dev);
static TW_VOID twa_busdma_lock(TW_VOID *lock_arg, bus_dma_lock_op_t op);
-static TW_VOID twa_pci_intr(TW_VOID *arg);
#ifdef TW_OSLI_DEFERRED_INTR_USED
+static int twa_pci_intr_fast(TW_VOID *arg);
static TW_VOID twa_deferred_intr(TW_VOID *context, TW_INT32 pending);
+#else
+static TW_VOID twa_pci_intr(TW_VOID *arg);
#endif /* TW_OSLI_DEFERRED_INTR_USED */
static TW_INT32 tw_osli_alloc_mem(struct twa_softc *sc);
@@ -357,12 +359,13 @@ twa_attach(device_t dev)
return(ENXIO);
}
if ((error = bus_setup_intr(sc->bus_dev, sc->irq_res,
- ((mp_ncpus > 1) ? (INTR_MPSAFE
+ INTR_TYPE_CAM | INTR_MPSAFE,
#ifdef TW_OSLI_DEFERRED_INTR_USED
- | INTR_FAST
-#endif /* TW_OSLI_DEFERRED_INTR_USED */
- ) : 0) | INTR_TYPE_CAM,
- twa_pci_intr, sc, &sc->intr_handle))) {
+ twa_pci_intr_fast, NULL,
+#else
+ NULL, twa_pci_intr,
+#endif
+ sc, &sc->intr_handle))) {
tw_osli_printf(sc, "error = %d",
TW_CL_SEVERITY_ERROR_STRING,
TW_CL_MESSAGE_SOURCE_FREEBSD_DRIVER,
@@ -977,7 +980,28 @@ twa_busdma_lock(TW_VOID *lock_arg, bus_dma_lock_op_t op)
}
+#ifdef TW_OSLI_DEFERRED_INTR_USED
+/*
+ * Function name: twa_pci_intr_fast
+ * Description: Interrupt handler. Wrapper for twa_interrupt.
+ *
+ * Input: arg -- ptr to OSL internal ctlr context
+ * Output: FILTER_HANDLED or FILTER_STRAY
+ * Return value: None
+ */
+static int
+twa_pci_intr_fast(TW_VOID *arg)
+{
+ struct twa_softc *sc = (struct twa_softc *)arg;
+ tw_osli_dbg_dprintf(10, sc, "entered");
+ if (tw_cl_interrupt(&(sc->ctlr_handle))) {
+ tw_cl_deferred_interrupt(&(sc->ctlr_handle));
+ return(FILTER_HANDLED);
+ }
+ return(FILTER_STRAY);
+}
+#else
/*
* Function name: twa_pci_intr
* Description: Interrupt handler. Wrapper for twa_interrupt.
@@ -993,15 +1017,9 @@ twa_pci_intr(TW_VOID *arg)
tw_osli_dbg_dprintf(10, sc, "entered");
if (tw_cl_interrupt(&(sc->ctlr_handle)))
-#ifdef TW_OSLI_DEFERRED_INTR_USED
- taskqueue_enqueue_fast(taskqueue_fast,
- &(sc->deferred_intr_callback));
-#else /* TW_OSLI_DEFERRED_INTR_USED */
tw_cl_deferred_interrupt(&(sc->ctlr_handle));
-#endif /* TW_OSLI_DEFERRED_INTR_USED */
}
-
-
+#endif
#ifdef TW_OSLI_DEFERRED_INTR_USED
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index aab15fb..7e03883 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -254,7 +254,8 @@ twe_attach(device_t dev)
twe_free(sc);
return(ENXIO);
}
- if (bus_setup_intr(sc->twe_dev, sc->twe_irq, INTR_TYPE_BIO | INTR_ENTROPY, twe_pci_intr, sc, &sc->twe_intr)) {
+ if (bus_setup_intr(sc->twe_dev, sc->twe_irq, INTR_TYPE_BIO | INTR_ENTROPY,
+ NULL, twe_pci_intr, sc, &sc->twe_intr)) {
twe_printf(sc, "can't set up interrupt\n");
twe_free(sc);
return(ENXIO);
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index 3d3440d..ed1bf7e 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -418,7 +418,7 @@ epic_attach(device_t dev)
/* Activate our interrupt handler. */
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET,
- epic_intr, sc, &sc->sc_ih);
+ NULL, epic_intr, sc, &sc->sc_ih);
if (error) {
device_printf(dev, "couldn't set up irq\n");
goto fail;
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index 86519fe..dfa261f 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -340,7 +340,7 @@ txp_attach(dev)
ether_ifattach(ifp, eaddr);
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
- txp_intr, sc, &sc->sc_intrhand);
+ NULL, txp_intr, sc, &sc->sc_intrhand);
if (error) {
ether_ifdetach(ifp);
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;
diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c
index 902fd6f..8cd2f74 100644
--- a/sys/dev/ubsec/ubsec.c
+++ b/sys/dev/ubsec/ubsec.c
@@ -345,7 +345,7 @@ ubsec_attach(device_t dev)
* so make sure the IRQ is mapped appropriately.
*/
if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_NET | INTR_MPSAFE,
- ubsec_intr, sc, &sc->sc_ih)) {
+ NULL, ubsec_intr, sc, &sc->sc_ih)) {
device_printf(dev, "could not establish interrupt\n");
goto bad2;
}
diff --git a/sys/dev/usb/ehci_pci.c b/sys/dev/usb/ehci_pci.c
index 212f2bf..5805447 100644
--- a/sys/dev/usb/ehci_pci.c
+++ b/sys/dev/usb/ehci_pci.c
@@ -370,7 +370,7 @@ ehci_pci_attach(device_t self)
}
err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO,
- (driver_intr_t *) ehci_intr, sc, &sc->ih);
+ NULL, (driver_intr_t *)ehci_intr, sc, &sc->ih);
if (err) {
device_printf(self, "Could not setup irq, %d\n", err);
sc->ih = NULL;
diff --git a/sys/dev/usb/ohci_pci.c b/sys/dev/usb/ohci_pci.c
index 78bc401..914342d 100644
--- a/sys/dev/usb/ohci_pci.c
+++ b/sys/dev/usb/ohci_pci.c
@@ -297,8 +297,8 @@ ohci_pci_attach(device_t self)
sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self));
}
- err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, ohci_intr, sc,
- &sc->ih);
+ err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, NULL, ohci_intr,
+ sc, &sc->ih);
if (err) {
device_printf(self, "Could not setup irq, %d\n", err);
sc->ih = NULL;
diff --git a/sys/dev/usb/uhci_pci.c b/sys/dev/usb/uhci_pci.c
index 6ca2037..dd4af7f 100644
--- a/sys/dev/usb/uhci_pci.c
+++ b/sys/dev/usb/uhci_pci.c
@@ -330,7 +330,7 @@ uhci_pci_attach(device_t self)
}
err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO,
- (driver_intr_t *) uhci_intr, sc, &sc->ih);
+ NULL, (driver_intr_t *) uhci_intr, sc, &sc->ih);
if (err) {
device_printf(self, "Could not setup irq, %d\n", err);
sc->ih = NULL;
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c
index bfe9da4..ab94094 100644
--- a/sys/dev/vge/if_vge.c
+++ b/sys/dev/vge/if_vge.c
@@ -1037,7 +1037,7 @@ vge_attach(dev)
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->vge_irq, INTR_TYPE_NET|INTR_MPSAFE,
- vge_intr, sc, &sc->vge_intrhand);
+ NULL, vge_intr, sc, &sc->vge_intrhand);
if (error) {
printf("vge%d: couldn't set up irq\n", unit);
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index be38015..45374c3 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -764,7 +764,7 @@ vr_attach(dev)
/* Hook interrupt last to avoid having to lock softc */
error = bus_setup_intr(dev, sc->vr_irq, INTR_TYPE_NET | INTR_MPSAFE,
- vr_intr, sc, &sc->vr_intrhand);
+ NULL, vr_intr, sc, &sc->vr_intrhand);
if (error) {
device_printf(dev, "couldn't set up irq\n");
diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c
index 459e348..9eb41a4 100644
--- a/sys/dev/vx/if_vx_eisa.c
+++ b/sys/dev/vx/if_vx_eisa.c
@@ -152,8 +152,8 @@ vx_eisa_attach(device_t dev)
if (vx_attach(dev) == 0)
goto bad;
- if (bus_setup_intr(dev, irq, INTR_TYPE_NET | INTR_MPSAFE, vx_intr, sc,
- &sc->vx_intrhand))
+ if (bus_setup_intr(dev, irq, INTR_TYPE_NET | INTR_MPSAFE, NULL,
+ vx_intr, sc, &sc->vx_intrhand))
goto bad_mtx;
return (0);
diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c
index dc0fea7..194887f 100644
--- a/sys/dev/vx/if_vx_pci.c
+++ b/sys/dev/vx/if_vx_pci.c
@@ -148,7 +148,7 @@ vx_pci_attach(device_t dev)
goto bad;
if (bus_setup_intr(dev, sc->vx_irq, INTR_TYPE_NET | INTR_MPSAFE,
- vx_intr, sc, &sc->vx_intrhand))
+ NULL, vx_intr, sc, &sc->vx_intrhand))
goto bad_mtx;
/* defect check for 3C590 */
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 82d69ec..0a8da06 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -264,7 +264,7 @@ wi_attach(device_t dev)
* unless you can prove it!
*/
error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE,
- wi_intr, sc, &sc->wi_intrhand);
+ NULL, wi_intr, sc, &sc->wi_intrhand);
if (error) {
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index ec8bb01..accaafe 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -1925,8 +1925,8 @@ xe_activate(device_t dev)
xe_deactivate(dev);
return ENOMEM;
}
- if ((err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, xe_intr, sc,
- &sc->intrhand)) != 0) {
+ if ((err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, NULL,
+ xe_intr, sc, &sc->intrhand)) != 0) {
xe_deactivate(dev);
return err;
}
OpenPOWER on IntegriCloud