From 4793b3db380bcaac1d396101ed11d3b3001642e5 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 22 Feb 2006 18:16:26 +0000 Subject: - Use bus_setup_intr() and bus_teardown_intr() to register device driver interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR(). Uses of the BUS_*() versions in the implementation of foo_intr methods in bus drivers were not changed. Mostly this just means that some drivers might start printing diagnostic messages like [FAST] when appropriate as well as honoring mpsafenet=0. - Fix two more of the ppbus drivers' identify routines to function correctly in the mythical case of a machine with more than one ppbus. --- sys/pc98/cbus/fdc.c | 5 ++--- sys/pc98/cbus/pckbd.c | 3 +-- sys/pc98/cbus/ppc.c | 3 +-- sys/pc98/cbus/sio.c | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) (limited to 'sys/pc98/cbus') diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index d2ac417..9fc1710 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -654,8 +654,7 @@ fdc_release_resources(struct fdc_data *fdc) dev = fdc->fdc_dev; if (fdc->fdc_intr) { - BUS_TEARDOWN_INTR(device_get_parent(dev), dev, fdc->res_irq, - fdc->fdc_intr); + bus_teardown_intr(dev, fdc->res_irq, fdc->fdc_intr); fdc->fdc_intr = NULL; } if (fdc->res_irq != 0) { @@ -823,7 +822,7 @@ fdc_attach(device_t dev) fdc = device_get_softc(dev); fdc->fdc_dev = dev; - error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, + error = bus_setup_intr(dev, fdc->res_irq, INTR_TYPE_BIO | INTR_ENTROPY, fdc_intr, fdc, &fdc->fdc_intr); if (error) { diff --git a/sys/pc98/cbus/pckbd.c b/sys/pc98/cbus/pckbd.c index 7eed7ca..a93aa52 100644 --- a/sys/pc98/cbus/pckbd.c +++ b/sys/pc98/cbus/pckbd.c @@ -136,8 +136,7 @@ pckbdattach(device_t dev) res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (res == NULL) return ENXIO; - BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, - pckbd_isa_intr, kbd, &ih); + bus_setup_intr(dev, res, INTR_TYPE_TTY, pckbd_isa_intr, kbd, &ih); return 0; } diff --git a/sys/pc98/cbus/ppc.c b/sys/pc98/cbus/ppc.c index 664336e..2989eed 100644 --- a/sys/pc98/cbus/ppc.c +++ b/sys/pc98/cbus/ppc.c @@ -2024,7 +2024,6 @@ ppc_attach(device_t dev) struct ppc_data *ppc = DEVTOSOFTC(dev); device_t ppbus; - device_t parent = device_get_parent(dev); device_printf(dev, "%s chipset (%s) in %s mode%s\n", ppc_models[ppc->ppc_model], ppc_avms[ppc->ppc_avm], @@ -2052,7 +2051,7 @@ ppc_attach(device_t dev) /* register the ppc interrupt handler as default */ if (ppc->res_irq) { /* default to the tty mask for registration */ /* XXX */ - if (BUS_SETUP_INTR(parent, dev, ppc->res_irq, INTR_TYPE_TTY, + if (bus_setup_intr(dev, ppc->res_irq, INTR_TYPE_TTY, ppcintr, dev, &ppc->intr_cookie) == 0) { /* remember the ppcintr is registered */ diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 51f4a45..5071fa9 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -1738,11 +1738,11 @@ determined_type: ; rid = 0; com->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (com->irqres) { - ret = BUS_SETUP_INTR(device_get_parent(dev), dev, com->irqres, + ret = bus_setup_intr(dev, com->irqres, INTR_TYPE_TTY | INTR_FAST, siointr, com, &com->cookie); if (ret) { - ret = BUS_SETUP_INTR(device_get_parent(dev), dev, + ret = bus_setup_intr(dev, com->irqres, INTR_TYPE_TTY, siointr, com, &com->cookie); if (ret == 0) -- cgit v1.1