diff --git a/sys/alpha/isa/isa.c b/sys/alpha/isa/isa.c index db1104c347cd..6e01cecb7ee8 100644 --- a/sys/alpha/isa/isa.c +++ b/sys/alpha/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.10 1999/04/16 21:21:37 peter Exp $ + * $Id: isa.c,v 1.11 1999/04/21 07:26:23 peter Exp $ */ #include @@ -105,7 +105,6 @@ static device_method_t isa_methods[] = { static driver_t isa_driver = { "isa", isa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; @@ -680,7 +679,7 @@ isa_handle_intr(void *arg) int isa_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep) { struct isa_intr *ii; diff --git a/sys/alpha/isa/isavar.h b/sys/alpha/isa/isavar.h index ce0e8ce4b218..0eee66e687ca 100644 --- a/sys/alpha/isa/isavar.h +++ b/sys/alpha/isa/isavar.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: isavar.h,v 1.1 1999/04/16 21:21:37 peter Exp $ */ /* @@ -33,7 +33,8 @@ void isa_init_intr(void); struct resource *isa_alloc_intr(device_t bus, device_t child, int irq); int isa_release_intr(device_t bus, device_t child, struct resource *r); -int isa_setup_intr(device_t dev, device_t child, struct resource *irq, +int isa_setup_intr(device_t dev, device_t child, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep); int isa_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); diff --git a/sys/alpha/isa/mcclock_isa.c b/sys/alpha/isa/mcclock_isa.c index 08345f2d2b24..3c6ca8033310 100644 --- a/sys/alpha/isa/mcclock_isa.c +++ b/sys/alpha/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $Id: mcclock_isa.c,v 1.2 1998/07/22 08:30:25 dfr Exp $ */ +/* $Id: mcclock_isa.c,v 1.3 1998/07/31 09:20:35 dfr Exp $ */ /* $NetBSD: mcclock_tlsb.c,v 1.8 1998/05/13 02:50:29 thorpej Exp $ */ /* @@ -68,7 +68,6 @@ static device_method_t mcclock_isa_methods[] = { static driver_t mcclock_isa_driver = { "mcclock", mcclock_isa_methods, - DRIVER_TYPE_MISC, 1, /* XXX no softc */ }; diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c index fb86dc97e315..951689499927 100644 --- a/sys/alpha/pci/apecs.c +++ b/sys/alpha/pci/apecs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: apecs.c,v 1.5 1999/01/18 20:15:07 gallatin Exp $ + * $Id: apecs.c,v 1.6 1999/04/16 21:21:38 peter Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -450,8 +450,9 @@ static struct resource *apecs_alloc_resource(device_t bus, device_t child, u_int flags); static int apecs_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -static int apecs_setup_intr(device_t dev, device_t child, struct resource *irq, - driver_intr_t *intr, void *arg, void **cookiep); +static int apecs_setup_intr(device_t dev, device_t child, + struct resource *irq, int flags, + driver_intr_t *intr, void *arg, void **cookiep); static int apecs_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); @@ -474,7 +475,6 @@ static device_method_t apecs_methods[] = { static driver_t apecs_driver = { "apecs", apecs_methods, - DRIVER_TYPE_MISC, sizeof(struct apecs_softc), }; @@ -563,7 +563,7 @@ apecs_release_resource(device_t bus, device_t child, int type, int rid, static int apecs_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep) { int error; @@ -573,7 +573,8 @@ apecs_setup_intr(device_t dev, device_t child, * controller, so we need to special case it */ if(hwrpb->rpb_type == ST_DEC_2100_A50) - return isa_setup_intr(dev, child, irq, intr, arg, cookiep); + return isa_setup_intr(dev, child, irq, flags, + intr, arg, cookiep); error = rman_activate_resource(irq); if (error) diff --git a/sys/alpha/pci/apecs_pci.c b/sys/alpha/pci/apecs_pci.c index fb0b339e5497..cb05f8d9ecfc 100644 --- a/sys/alpha/pci/apecs_pci.c +++ b/sys/alpha/pci/apecs_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: apecs_pci.c,v 1.1 1999/04/16 21:21:38 peter Exp $ */ #include @@ -66,7 +66,6 @@ static device_method_t apecs_pcib_methods[] = { static driver_t apecs_pcib_driver = { "pcib", apecs_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c index e967493b5117..ca7032a13d27 100644 --- a/sys/alpha/pci/cia.c +++ b/sys/alpha/pci/cia.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cia.c,v 1.15 1999/03/28 17:52:17 dfr Exp $ + * $Id: cia.c,v 1.16 1999/04/16 21:21:39 peter Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -644,7 +644,8 @@ cia_write_hae(u_int64_t hae) static int cia_probe(device_t dev); static int cia_attach(device_t dev); -static int cia_setup_intr(device_t dev, device_t child, struct resource *irq, +static int cia_setup_intr(device_t dev, device_t child, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep); static int cia_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); @@ -669,7 +670,6 @@ static device_method_t cia_methods[] = { static driver_t cia_driver = { "cia", cia_methods, - DRIVER_TYPE_MISC, sizeof(struct cia_softc), }; @@ -815,7 +815,7 @@ cia_attach(device_t dev) static int cia_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep) { int error; diff --git a/sys/alpha/pci/cia_pci.c b/sys/alpha/pci/cia_pci.c index e77c3b41722e..9b0c7d11c74a 100644 --- a/sys/alpha/pci/cia_pci.c +++ b/sys/alpha/pci/cia_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: cia_pci.c,v 1.1 1999/04/16 21:21:39 peter Exp $ */ #include @@ -66,7 +66,6 @@ static device_method_t cia_pcib_methods[] = { static driver_t cia_pcib_driver = { "pcib", cia_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/alpha/pci/lca.c b/sys/alpha/pci/lca.c index b60fb3e7fda4..1c86d94420cd 100644 --- a/sys/alpha/pci/lca.c +++ b/sys/alpha/pci/lca.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lca.c,v 1.5 1998/12/04 22:54:42 archie Exp $ + * $Id: lca.c,v 1.6 1999/04/16 21:21:39 peter Exp $ */ #include @@ -360,7 +360,6 @@ static device_method_t lca_methods[] = { static driver_t lca_driver = { "lca", lca_methods, - DRIVER_TYPE_MISC, sizeof(struct lca_softc), }; diff --git a/sys/alpha/pci/lca_pci.c b/sys/alpha/pci/lca_pci.c index 61e35257b784..7e84de424152 100644 --- a/sys/alpha/pci/lca_pci.c +++ b/sys/alpha/pci/lca_pci.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: lca_pci.c,v 1.1 1999/04/16 21:21:39 peter Exp $ */ #include @@ -66,7 +66,6 @@ static device_method_t lca_pcib_methods[] = { static driver_t lca_pcib_driver = { "pcib", lca_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/alpha/pci/pcibus.c b/sys/alpha/pci/pcibus.c index f0c0eb2986b9..1479e128e964 100644 --- a/sys/alpha/pci/pcibus.c +++ b/sys/alpha/pci/pcibus.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcibus.c,v 1.10 1999/04/19 08:55:11 dfr Exp $ + * $Id: pcibus.c,v 1.11 1999/04/21 07:26:24 peter Exp $ * */ @@ -149,7 +149,8 @@ alpha_platform_setup_ide_intr(int chan, driver_intr_t *fn, void *arg) struct resource *res; res = isa_alloc_intr(0, 0, irqs[chan]); if (res) - return isa_setup_intr(0, 0, res, fn, arg, &junk); + return isa_setup_intr(0, 0, res, INTR_TYPE_BIO, + fn, arg, &junk); else return ENOMEM; } diff --git a/sys/alpha/tc/esp.c b/sys/alpha/tc/esp.c index 1a860c264c81..336e0fb8c123 100644 --- a/sys/alpha/tc/esp.c +++ b/sys/alpha/tc/esp.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: esp.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* $NetBSD: esp.c,v 1.8.4.2 1996/09/10 17:28:16 cgd Exp $ */ /* @@ -107,7 +107,6 @@ static device_method_t esp_methods[] = { static driver_t esp_driver = { "esp", esp_methods, - DRIVER_TYPE_BIO, sizeof(struct esp_softc), }; diff --git a/sys/alpha/tc/if_le_ioasic.c b/sys/alpha/tc/if_le_ioasic.c index fe3eacccaf3c..d672e77ee381 100644 --- a/sys/alpha/tc/if_le_ioasic.c +++ b/sys/alpha/tc/if_le_ioasic.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: if_le_ioasic.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* $NetBSD: if_le_ioasic.c,v 1.10 1998/01/19 02:49:48 thorpej Exp $ */ /* @@ -79,7 +79,6 @@ static device_method_t le_ioasic_methods[] = { static driver_t le_ioasic_driver = { "le", le_ioasic_methods, - DRIVER_TYPE_NET, sizeof(struct le_softc), }; diff --git a/sys/alpha/tc/ioasic.c b/sys/alpha/tc/ioasic.c index 5c862a94c60b..175f2b8cff8d 100644 --- a/sys/alpha/tc/ioasic.c +++ b/sys/alpha/tc/ioasic.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: ioasic.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* from $NetBSD: ioasic.c,v 1.19 1998/05/27 00:18:13 thorpej Exp $ */ /*- @@ -117,7 +117,6 @@ static device_method_t ioasic_methods[] = { static driver_t ioasic_driver = { "ioasic", ioasic_methods, - DRIVER_TYPE_MISC, sizeof(struct ioasic_softc), }; diff --git a/sys/alpha/tc/mcclock_ioasic.c b/sys/alpha/tc/mcclock_ioasic.c index 2dee0c0835f0..813d60d33726 100644 --- a/sys/alpha/tc/mcclock_ioasic.c +++ b/sys/alpha/tc/mcclock_ioasic.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: mcclock_ioasic.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ /* $NetBSD: mcclock_ioasic.c,v 1.8 1997/09/02 13:20:14 thorpej Exp $ */ /* @@ -90,7 +90,6 @@ static device_method_t mcclock_ioasic_methods[] = { static driver_t mcclock_ioasic_driver = { "mcclock", mcclock_ioasic_methods, - DRIVER_TYPE_MISC, sizeof(struct mcclock_ioasic_softc), }; diff --git a/sys/alpha/tc/tc.c b/sys/alpha/tc/tc.c index dd99f14339ab..3c6169d1bdd7 100644 --- a/sys/alpha/tc/tc.c +++ b/sys/alpha/tc/tc.c @@ -1,4 +1,4 @@ -/* $Id: tc.c,v 1.1 1998/08/20 08:27:10 dfr Exp $ */ +/* $Id: tc.c,v 1.2 1999/04/16 21:21:40 peter Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. * All rights reserved. @@ -88,7 +88,6 @@ static device_method_t tc_methods[] = { static driver_t tc_driver = { "tc", tc_methods, - DRIVER_TYPE_MISC, sizeof(struct tc_softc), }; diff --git a/sys/alpha/tc/tcasic.c b/sys/alpha/tc/tcasic.c index eeb695391b2d..b06db143693b 100644 --- a/sys/alpha/tc/tcasic.c +++ b/sys/alpha/tc/tcasic.c @@ -1,4 +1,4 @@ -/* $Id: tcasic.c,v 1.1 1998/08/20 08:27:11 dfr Exp $ */ +/* $Id: tcasic.c,v 1.2 1999/04/16 21:21:41 peter Exp $ */ /* from $NetBSD: tcasic.c,v 1.23 1998/05/14 00:01:31 thorpej Exp $ */ /* @@ -69,7 +69,6 @@ static device_method_t tcasic_methods[] = { static driver_t tcasic_driver = { "tcasic", tcasic_methods, - DRIVER_TYPE_MISC, sizeof(struct tcasic_softc), }; diff --git a/sys/alpha/tc/tcds.c b/sys/alpha/tc/tcds.c index 37a3da96bbdb..1229c7e92df7 100644 --- a/sys/alpha/tc/tcds.c +++ b/sys/alpha/tc/tcds.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: tcds.c,v 1.1 1998/08/20 08:27:11 dfr Exp $ */ /* from $NetBSD: tcds.c,v 1.25 1998/05/26 23:43:05 thorpej Exp $ */ /*- @@ -123,7 +123,6 @@ static device_method_t tcds_methods[] = { static driver_t tcds_driver = { "tcds", tcds_methods, - DRIVER_TYPE_MISC, sizeof(struct tcds_softc), }; diff --git a/sys/alpha/tlsb/dwlpx.c b/sys/alpha/tlsb/dwlpx.c index 5a2a5cdc320a..d558b5119d85 100644 --- a/sys/alpha/tlsb/dwlpx.c +++ b/sys/alpha/tlsb/dwlpx.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: dwlpx.c,v 1.7 1998/11/15 18:25:16 dfr Exp $ + * $Id: dwlpx.c,v 1.8 1999/04/16 21:21:42 peter Exp $ */ #include "opt_simos.h" @@ -268,7 +268,6 @@ static device_method_t dwlpx_methods[] = { static driver_t dwlpx_driver = { "dwlpx", dwlpx_methods, - DRIVER_TYPE_MISC, sizeof(struct dwlpx_softc), }; @@ -303,7 +302,7 @@ dwlpx_attach(device_t dev) *(u_int32_t*) (regs + PCIA_CTL(0)) = 1; /* Type1 config cycles */ - return BUS_SETUP_INTR(parent, dev, NULL, dwlpx_intr, 0, &intr); + return BUS_SETUP_INTR(parent, dev, NULL, INTR_TYPE_MISC, dwlpx_intr, 0, &intr); return 0; } diff --git a/sys/alpha/tlsb/gbus.c b/sys/alpha/tlsb/gbus.c index f98a3bd4f24f..2d4ad304a204 100644 --- a/sys/alpha/tlsb/gbus.c +++ b/sys/alpha/tlsb/gbus.c @@ -101,7 +101,6 @@ static device_method_t gbus_methods[] = { static driver_t gbus_driver = { "gbus", gbus_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/alpha/tlsb/kftxx.c b/sys/alpha/tlsb/kftxx.c index d85b202a4a1e..bfcd2e07dbd6 100644 --- a/sys/alpha/tlsb/kftxx.c +++ b/sys/alpha/tlsb/kftxx.c @@ -1,4 +1,4 @@ -/* $Id: kftxx.c,v 1.3 1998/07/12 16:23:17 dfr Exp $ */ +/* $Id: kftxx.c,v 1.4 1998/11/15 18:25:16 dfr Exp $ */ /* $NetBSD: kftxx.c,v 1.9 1998/05/14 00:01:32 thorpej Exp $ */ /* @@ -98,7 +98,6 @@ static device_method_t kft_methods[] = { static driver_t kft_driver = { "kft", kft_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/alpha/tlsb/mcclock_tlsb.c b/sys/alpha/tlsb/mcclock_tlsb.c index d0d017c533d4..97dec5b52278 100644 --- a/sys/alpha/tlsb/mcclock_tlsb.c +++ b/sys/alpha/tlsb/mcclock_tlsb.c @@ -1,4 +1,4 @@ -/* $Id: mcclock_tlsb.c,v 1.2 1998/06/14 13:45:26 dfr Exp $ */ +/* $Id: mcclock_tlsb.c,v 1.3 1998/07/31 09:20:01 dfr Exp $ */ /* $NetBSD: mcclock_tlsb.c,v 1.8 1998/05/13 02:50:29 thorpej Exp $ */ /* @@ -81,7 +81,6 @@ static device_method_t mcclock_tlsb_methods[] = { static driver_t mcclock_tlsb_driver = { "mcclock", mcclock_tlsb_methods, - DRIVER_TYPE_MISC, sizeof(struct mcclock_tlsb_softc), }; diff --git a/sys/alpha/tlsb/tlsb.c b/sys/alpha/tlsb/tlsb.c index 00aff9adf87a..f1097b20a4a1 100644 --- a/sys/alpha/tlsb/tlsb.c +++ b/sys/alpha/tlsb/tlsb.c @@ -96,7 +96,7 @@ static int tlsb_probe(device_t dev); static void tlsb_print_child(device_t dev, device_t child); static int tlsb_read_ivar(device_t dev, device_t child, int which, u_long* result); static int tlsb_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep); static int tlsb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); @@ -121,7 +121,6 @@ static device_method_t tlsb_methods[] = { static driver_t tlsb_driver = { "tlsb", tlsb_methods, - DRIVER_TYPE_MISC, sizeof(struct tlsb_softc), }; @@ -270,7 +269,7 @@ tlsb_read_ivar(device_t dev, device_t child, static int tlsb_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep) { struct tlsb_softc* sc = device_get_softc(dev); diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 997658c654fb..9ea89d336bc8 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: zs_tlsb.c,v 1.8 1999/04/27 11:13:45 phk Exp $ + * $Id: zs_tlsb.c,v 1.9 1999/05/07 10:09:38 phk Exp $ */ /* * This driver is a hopeless hack to get the SimOS console working. A real @@ -114,7 +114,6 @@ static device_method_t zs_methods[] = { static driver_t zs_driver = { "zs", zs_methods, - DRIVER_TYPE_MISC, sizeof(struct zs_softc), }; @@ -415,7 +414,6 @@ static device_method_t zsc_tlsb_methods[] = { static driver_t zsc_tlsb_driver = { "zsc", zsc_tlsb_methods, - DRIVER_TYPE_MISC, sizeof(struct zsc_softc), }; @@ -466,8 +464,8 @@ zsc_tlsb_attach(device_t dev) sc->sc_b = ZS_SOFTC(1); /* XXX should use resource argument to communicate vector */ - return BUS_SETUP_INTR(parent, dev, NULL, zsc_tlsb_intr, sc, - &sc->intr); + return BUS_SETUP_INTR(parent, dev, NULL, INTR_TYPE_TTY, + zsc_tlsb_intr, sc, &sc->intr); return 0; } diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 2d50255d2434..063f7ce11095 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.69 1999/05/06 12:47:21 peter Exp $ + * $Id: npx.c,v 1.70 1999/05/08 18:14:09 peter Exp $ */ #include "npx.h" @@ -363,7 +363,8 @@ npx_probe1(dev) if (r == 0) panic("npx: can't get IRQ"); BUS_SETUP_INTR(device_get_parent(dev), - dev, r, npx_intr, 0, &intr); + dev, r, INTR_TYPE_MISC, + npx_intr, 0, &intr); if (intr == 0) panic("npx: can't create intr"); @@ -717,7 +718,6 @@ static device_method_t npx_methods[] = { static driver_t npx_driver = { "npx", npx_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c index 447b976a0b27..a42d4177aa67 100644 --- a/sys/amd64/amd64/legacy.c +++ b/sys/amd64/amd64/legacy.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: nexus.c,v 1.6 1999/05/08 20:24:44 peter Exp $ + * $Id: nexus.c,v 1.7 1999/05/08 21:34:34 peter Exp $ */ /* @@ -88,7 +88,7 @@ static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); -static int nexus_setup_intr(device_t, device_t, struct resource *, +static int nexus_setup_intr(device_t, device_t, struct resource *, int flags, void (*)(void *), void *, void **); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); @@ -117,7 +117,6 @@ static device_method_t nexus_methods[] = { static driver_t nexus_driver = { "nexus", nexus_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; static devclass_t nexus_devclass; @@ -317,7 +316,7 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, */ static int nexus_setup_intr(device_t bus, device_t child, struct resource *irq, - void (*ihand)(void *), void *arg, void **cookiep) + int flags, void (*ihand)(void *), void *arg, void **cookiep) { intrmask_t *mask; driver_t *driver; @@ -335,24 +334,24 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq, icflags = INTR_EXCL; driver = device_get_driver(child); - switch (driver->type) { - case DRIVER_TYPE_TTY: + switch (flags) { + case INTR_TYPE_TTY: mask = &tty_imask; break; - case (DRIVER_TYPE_TTY | DRIVER_TYPE_FAST): + case (INTR_TYPE_TTY | INTR_TYPE_FAST): mask = &tty_imask; icflags |= INTR_FAST; break; - case DRIVER_TYPE_BIO: + case INTR_TYPE_BIO: mask = &bio_imask; break; - case DRIVER_TYPE_NET: + case INTR_TYPE_NET: mask = &net_imask; break; - case DRIVER_TYPE_CAM: + case INTR_TYPE_CAM: mask = &cam_imask; break; - case DRIVER_TYPE_MISC: + case INTR_TYPE_MISC: mask = 0; break; default: @@ -415,7 +414,6 @@ static device_method_t nexus_pcib_methods[] = { static driver_t nexus_pcib_driver = { "pcib", nexus_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c index 447b976a0b27..a42d4177aa67 100644 --- a/sys/amd64/amd64/nexus.c +++ b/sys/amd64/amd64/nexus.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: nexus.c,v 1.6 1999/05/08 20:24:44 peter Exp $ + * $Id: nexus.c,v 1.7 1999/05/08 21:34:34 peter Exp $ */ /* @@ -88,7 +88,7 @@ static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); -static int nexus_setup_intr(device_t, device_t, struct resource *, +static int nexus_setup_intr(device_t, device_t, struct resource *, int flags, void (*)(void *), void *, void **); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); @@ -117,7 +117,6 @@ static device_method_t nexus_methods[] = { static driver_t nexus_driver = { "nexus", nexus_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; static devclass_t nexus_devclass; @@ -317,7 +316,7 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, */ static int nexus_setup_intr(device_t bus, device_t child, struct resource *irq, - void (*ihand)(void *), void *arg, void **cookiep) + int flags, void (*ihand)(void *), void *arg, void **cookiep) { intrmask_t *mask; driver_t *driver; @@ -335,24 +334,24 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq, icflags = INTR_EXCL; driver = device_get_driver(child); - switch (driver->type) { - case DRIVER_TYPE_TTY: + switch (flags) { + case INTR_TYPE_TTY: mask = &tty_imask; break; - case (DRIVER_TYPE_TTY | DRIVER_TYPE_FAST): + case (INTR_TYPE_TTY | INTR_TYPE_FAST): mask = &tty_imask; icflags |= INTR_FAST; break; - case DRIVER_TYPE_BIO: + case INTR_TYPE_BIO: mask = &bio_imask; break; - case DRIVER_TYPE_NET: + case INTR_TYPE_NET: mask = &net_imask; break; - case DRIVER_TYPE_CAM: + case INTR_TYPE_CAM: mask = &cam_imask; break; - case DRIVER_TYPE_MISC: + case INTR_TYPE_MISC: mask = 0; break; default: @@ -415,7 +414,6 @@ static device_method_t nexus_pcib_methods[] = { static driver_t nexus_pcib_driver = { "pcib", nexus_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 5251c8018d71..512be7a798a3 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.123 1999/05/08 18:15:49 peter Exp $ + * $Id: isa.c,v 1.124 1999/05/08 21:28:39 peter Exp $ */ /* @@ -564,11 +564,11 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, * deal). */ static int -isa_setup_intr(device_t bus, device_t child, struct resource *r, +isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, void (*ihand)(void *), void *arg, void **cookiep) { - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, ihand, arg, - cookiep)); + return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, + ihand, arg, cookiep)); } static int @@ -604,7 +604,6 @@ static device_method_t isa_methods[] = { static driver_t isa_driver = { "isa", isa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index 2d50255d2434..063f7ce11095 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.69 1999/05/06 12:47:21 peter Exp $ + * $Id: npx.c,v 1.70 1999/05/08 18:14:09 peter Exp $ */ #include "npx.h" @@ -363,7 +363,8 @@ npx_probe1(dev) if (r == 0) panic("npx: can't get IRQ"); BUS_SETUP_INTR(device_get_parent(dev), - dev, r, npx_intr, 0, &intr); + dev, r, INTR_TYPE_MISC, + npx_intr, 0, &intr); if (intr == 0) panic("npx: can't create intr"); @@ -717,7 +718,6 @@ static device_method_t npx_methods[] = { static driver_t npx_driver = { "npx", npx_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/dev/advansys/adv_eisa.c b/sys/dev/advansys/adv_eisa.c index 465f6759b909..69a2a39fa05b 100644 --- a/sys/dev/advansys/adv_eisa.c +++ b/sys/dev/advansys/adv_eisa.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adv_eisa.c,v 1.2 1998/12/22 18:14:09 gibbs Exp $ + * $Id: adv_eisa.c,v 1.3 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -316,7 +316,7 @@ adveisaattach(device_t dev) /* * Enable our interrupt handler. */ - bus_setup_intr(dev, irq, adv_intr, adv, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, adv_intr, adv, &ih); /* Attach sub-devices - always succeeds */ adv_attach(adv); @@ -342,7 +342,6 @@ static device_method_t adv_eisa_methods[] = { static driver_t adv_eisa_driver = { "adv", adv_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 6e0db43941c9..86ba09be29ed 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahb.c,v 1.10 1999/04/23 23:29:00 gibbs Exp $ + * $Id: ahb.c,v 1.11 1999/05/06 20:16:31 ken Exp $ */ #include "eisa.h" @@ -369,7 +369,7 @@ ahbattach(device_t dev) goto error_exit; /* Enable our interrupt */ - bus_setup_intr(dev, irq, ahbintr, ahb, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, ahbintr, ahb, &ih); return (0); error_exit: @@ -1347,7 +1347,6 @@ static device_method_t ahb_eisa_methods[] = { static driver_t ahb_eisa_driver = { "ahb", ahb_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/dev/aic7xxx/ahc_eisa.c b/sys/dev/aic7xxx/ahc_eisa.c index fe02ca638e84..e0c0c5119297 100644 --- a/sys/dev/aic7xxx/ahc_eisa.c +++ b/sys/dev/aic7xxx/ahc_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_eisa.c,v 1.6 1999/04/18 15:50:33 peter Exp $ + * $Id: ahc_eisa.c,v 1.7 1999/04/23 23:29:00 gibbs Exp $ */ #include "eisa.h" @@ -465,7 +465,6 @@ static device_method_t ahc_eisa_methods[] = { static driver_t ahc_eisa_driver = { "ahc", ahc_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 818e491f9ad7..7f8fd69898c7 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.8 1999/03/23 07:26:41 gibbs Exp $ + * $Id: ahc_pci.c,v 1.9 1999/04/23 23:30:21 gibbs Exp $ */ #include @@ -162,7 +162,6 @@ static device_method_t ahc_pci_methods[] = { static driver_t ahc_pci_driver = { "ahc", ahc_pci_methods, - DRIVER_TYPE_CAM, sizeof(struct ahc_softc) }; diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 215e0a420f50..cc68263f7196 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -36,7 +36,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.24 1999/04/26 22:03:44 ken Exp $ + * $Id: aic7xxx.c,v 1.25 1999/05/06 20:16:17 ken Exp $ */ /* * A few notes on features of the driver. @@ -1377,8 +1377,8 @@ ahc_attach(struct ahc_softc *ahc) s = splcam(); /* Hook up our interrupt handler */ - if ((error = bus_setup_intr(ahc->device, ahc->irq, ahc_intr, - ahc, &ahc->ih)) != 0) { + if ((error = bus_setup_intr(ahc->device, ahc->irq, INTR_TYPE_CAM, + ahc_intr, ahc, &ahc->ih)) != 0) { device_printf(ahc->device, "bus_setup_intr() failed: %d\n", error); goto fail; diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 2426bbc6da9f..69b0cc9ac95f 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ata-all.c,v 1.10 1999/04/21 10:58:07 peter Exp $ + * $Id: ata-all.c,v 1.11 1999/04/22 08:07:44 sos Exp $ */ #include "ata.h" @@ -141,7 +141,7 @@ ata_isaattach(device_t dev) return (ENOMEM); } scp = device_get_softc(dev); - return bus_setup_intr(dev, irq, ataintr, scp, &ih); + return bus_setup_intr(dev, irq, INTR_TYPE_BIO, ataintr, scp, &ih); } static device_method_t ata_isa_methods[] = { @@ -154,7 +154,6 @@ static device_method_t ata_isa_methods[] = { static driver_t ata_isa_driver = { "ata-isa", ata_isa_methods, - DRIVER_TYPE_BIO, sizeof(int), }; @@ -314,9 +313,11 @@ ata_pciattach(device_t dev) irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,RF_ACTIVE); if (sysctrl) - bus_setup_intr(dev, irq, promise_intr, scp, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_BIO, + promise_intr, scp, &ih); else - bus_setup_intr(dev, irq, ataintr, scp, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_BIO, + ataintr, scp, &ih); } printf("ata%d at 0x%04x irq %d on ata-pci%d\n", lun, iobase_1, isa_apic_irq(irq1), unit); @@ -339,7 +340,7 @@ ata_pciattach(device_t dev) irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0,1,RF_ACTIVE); if (!sysctrl) - bus_setup_intr(dev, irq, ataintr, scp, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_BIO, ataintr, scp, &ih); } printf("ata%d at 0x%04x irq %d on ata-pci%d\n", lun, iobase_2, isa_apic_irq(irq2), unit); @@ -357,7 +358,6 @@ static device_method_t ata_pci_methods[] = { static driver_t ata_pci_driver = { "ata-pci", ata_pci_methods, - DRIVER_TYPE_BIO, sizeof(int), }; diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index 1d7ee623dd3b..89426819fc23 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd_isa.c,v 1.2 1999/03/10 10:36:49 yokota Exp $ + * $Id: atkbd_isa.c,v 1.3 1999/04/16 21:22:34 peter Exp $ */ #include "atkbd.h" @@ -64,7 +64,6 @@ static device_method_t atkbd_methods[] = { static driver_t atkbd_driver = { ATKBD_DRIVER_NAME, atkbd_methods, - DRIVER_TYPE_TTY, sizeof(atkbd_softc_t), }; @@ -111,8 +110,8 @@ atkbdattach(device_t dev) /* declare our interrupt handler */ res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, atkbd_isa_intr, sc, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, + atkbd_isa_intr, sc, &ih); return 0; } diff --git a/sys/dev/atkbdc/atkbd_isa.c b/sys/dev/atkbdc/atkbd_isa.c index 1d7ee623dd3b..89426819fc23 100644 --- a/sys/dev/atkbdc/atkbd_isa.c +++ b/sys/dev/atkbdc/atkbd_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd_isa.c,v 1.2 1999/03/10 10:36:49 yokota Exp $ + * $Id: atkbd_isa.c,v 1.3 1999/04/16 21:22:34 peter Exp $ */ #include "atkbd.h" @@ -64,7 +64,6 @@ static device_method_t atkbd_methods[] = { static driver_t atkbd_driver = { ATKBD_DRIVER_NAME, atkbd_methods, - DRIVER_TYPE_TTY, sizeof(atkbd_softc_t), }; @@ -111,8 +110,8 @@ atkbdattach(device_t dev) /* declare our interrupt handler */ res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, atkbd_isa_intr, sc, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, + atkbd_isa_intr, sc, &ih); return 0; } diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 8e5a62b9bc09..5342c52756c6 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbdc_isa.c,v 1.2 1999/04/16 23:39:15 peter Exp $ + * $Id: atkbdc_isa.c,v 1.3 1999/05/08 20:25:38 peter Exp $ */ #include "atkbdc.h" @@ -82,7 +82,6 @@ static device_method_t atkbdc_methods[] = { static driver_t atkbdc_driver = { ATKBDC_DRIVER_NAME, atkbdc_methods, - DRIVER_TYPE_MISC, sizeof(atkbdc_softc_t *), }; diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c index 8e5a62b9bc09..5342c52756c6 100644 --- a/sys/dev/atkbdc/atkbdc_subr.c +++ b/sys/dev/atkbdc/atkbdc_subr.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbdc_isa.c,v 1.2 1999/04/16 23:39:15 peter Exp $ + * $Id: atkbdc_isa.c,v 1.3 1999/05/08 20:25:38 peter Exp $ */ #include "atkbdc.h" @@ -82,7 +82,6 @@ static device_method_t atkbdc_methods[] = { static driver_t atkbdc_driver = { ATKBDC_DRIVER_NAME, atkbdc_methods, - DRIVER_TYPE_MISC, sizeof(atkbdc_softc_t *), }; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 70361ffc1c9c..c6f69a7cbc71 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.5 1999/04/18 15:12:11 peter Exp $ + * $Id: psm.c,v 1.6 1999/05/07 10:10:40 phk Exp $ */ /* @@ -305,7 +305,6 @@ static device_method_t psm_methods[] = { static driver_t psm_driver = { "psm", psm_methods, - DRIVER_TYPE_TTY, sizeof(struct psm_softc), }; @@ -1082,8 +1081,8 @@ psmattach(device_t dev) BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_IRQ, &irq); res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, psmintr, sc, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, + psmintr, sc, &ih); return (0); } diff --git a/sys/dev/bktr/bktr_i2c.c b/sys/dev/bktr/bktr_i2c.c index 176d069a837f..63ea8d050387 100644 --- a/sys/dev/bktr/bktr_i2c.c +++ b/sys/dev/bktr/bktr_i2c.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt848_i2c.c,v 1.1 1998/10/31 11:26:38 nsouch Exp $ + * $Id: bt848_i2c.c,v 1.2 1998/11/07 14:30:48 nsouch Exp $ * */ @@ -129,7 +129,6 @@ static device_method_t bti2c_methods[] = { static driver_t bti2c_driver = { "bti2c", bti2c_methods, - DRIVER_TYPE_MISC, sizeof(struct bti2c_softc), }; diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index 23de96cac40b..afa885698f1b 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt.c,v 1.19 1999/05/05 06:45:09 imp Exp $ + * $Id: bt.c,v 1.20 1999/05/06 20:16:20 ken Exp $ */ /* @@ -868,7 +868,8 @@ bt_attach(device_t dev) /* * Setup interrupt. */ - error = bus_setup_intr(dev, bt->irq, bt_intr, bt, &bt->ih); + error = bus_setup_intr(dev, bt->irq, INTR_TYPE_CAM, + bt_intr, bt, &bt->ih); if (error) { device_printf(dev, "bus_setup_intr() failed: %d\n", error); return (error); diff --git a/sys/dev/buslogic/bt_eisa.c b/sys/dev/buslogic/bt_eisa.c index 19cdd8c55196..fc369c8251f2 100644 --- a/sys/dev/buslogic/bt_eisa.c +++ b/sys/dev/buslogic/bt_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_eisa.c,v 1.5 1999/04/20 09:53:05 dfr Exp $ + * $Id: bt_eisa.c,v 1.6 1999/04/24 06:46:10 peter Exp $ */ #include "eisa.h" @@ -333,7 +333,6 @@ static device_method_t bt_eisa_methods[] = { static driver_t bt_eisa_driver = { "bt", bt_eisa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/dev/buslogic/bt_isa.c b/sys/dev/buslogic/bt_isa.c index f2150a7ddc45..c9d52c3cc6a6 100644 --- a/sys/dev/buslogic/bt_isa.c +++ b/sys/dev/buslogic/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.9 1999/04/18 19:08:28 peter Exp $ + * $Id: bt_isa.c,v 1.10 1999/04/24 06:48:27 peter Exp $ */ #include @@ -330,7 +330,6 @@ static device_method_t bt_isa_methods[] = { static driver_t bt_isa_driver = { "bt", bt_isa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/dev/buslogic/bt_pci.c b/sys/dev/buslogic/bt_pci.c index c5dd8426ca79..b126364d9658 100644 --- a/sys/dev/buslogic/bt_pci.c +++ b/sys/dev/buslogic/bt_pci.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_pci.c,v 1.5 1999/04/18 15:50:35 peter Exp $ + * $Id: bt_pci.c,v 1.6 1999/04/23 23:30:22 gibbs Exp $ */ #include "pci.h" @@ -224,7 +224,6 @@ static device_method_t bt_pci_methods[] = { static driver_t bt_pci_driver = { "bt", bt_pci_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/dev/dpt/dpt_eisa.c b/sys/dev/dpt/dpt_eisa.c index a8b24484d338..e38ea664136e 100644 --- a/sys/dev/dpt/dpt_eisa.c +++ b/sys/dev/dpt/dpt_eisa.c @@ -33,7 +33,7 @@ */ /* - * $Id: dpt_eisa.c,v 1.4 1998/09/15 08:33:35 gibbs Exp $ + * $Id: dpt_eisa.c,v 1.5 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -174,7 +174,7 @@ dpt_eisa_attach(device_t dev) /* Register with the XPT */ dpt_attach(dpt); - bus_setup_intr(dev, irq, dpt_intr, dpt, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, dpt_intr, dpt, &ih); splx(s); @@ -250,7 +250,6 @@ static device_method_t dpt_eisa_methods[] = { static driver_t dpt_eisa_driver = { "dpt", dpt_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c index d21964977274..d6142e06418a 100644 --- a/sys/dev/eisa/eisaconf.c +++ b/sys/dev/eisa/eisaconf.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: eisaconf.c,v 1.41 1999/04/19 13:34:25 peter Exp $ + * $Id: eisaconf.c,v 1.42 1999/05/06 22:17:26 peter Exp $ */ #include "opt_eisa.h" @@ -132,7 +132,6 @@ static device_method_t mainboard_methods[] = { static driver_t mainboard_driver = { "mainboard", mainboard_methods, - DRIVER_TYPE_MISC, 1, }; @@ -483,7 +482,6 @@ static device_method_t eisa_methods[] = { static driver_t eisa_driver = { "eisa", eisa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/dev/ep/if_ep_eisa.c b/sys/dev/ep/if_ep_eisa.c index 8a961663ecd9..81ba5a24e223 100644 --- a/sys/dev/ep/if_ep_eisa.c +++ b/sys/dev/ep/if_ep_eisa.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: 3c5x9.c,v 1.10 1997/09/21 21:35:21 gibbs Exp $ + * $Id: 3c5x9.c,v 1.11 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -274,7 +274,7 @@ ep_eisa_attach(device_t dev) ep_attach(sc); - bus_setup_intr(dev, irq, ep_intr, sc, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_NET, ep_intr, sc, &ih); return 0; @@ -299,7 +299,6 @@ static device_method_t ep_eisa_methods[] = { static driver_t ep_eisa_driver = { "ep", ep_eisa_methods, - DRIVER_TYPE_NET, 1, /* unused */ }; diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index f0a082f4c13d..197975b4807f 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.140 1999/05/07 10:10:30 phk Exp $ + * $Id: fd.c,v 1.141 1999/05/08 18:13:14 peter Exp $ * */ @@ -606,8 +606,8 @@ fdc_probe(device_t dev) goto out; } fdc->dmachan = fdc->res_drq->r_start; - error = BUS_SETUP_INTR(device_get_parent(dev), dev, - fdc->res_irq, fdc_intr, fdc, &fdc->fdc_intr); + error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, + INTR_TYPE_BIO, fdc_intr, fdc, &fdc->fdc_intr); /* First - lets reset the floppy controller */ outb(fdc->baseport + FDOUT, 0); @@ -2333,7 +2333,6 @@ static device_method_t fdc_methods[] = { static driver_t fdc_driver = { "fdc", fdc_methods, - DRIVER_TYPE_BIO, sizeof(struct fdc_data) }; @@ -2354,7 +2353,6 @@ static device_method_t fd_methods[] = { static driver_t fd_driver = { "fd", fd_methods, - DRIVER_TYPE_BIO, sizeof(struct fd_data) }; diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 53b8d4db00c6..4d7d5ef0d9d7 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.66 1999/03/20 04:51:25 wes Exp $ + * $Id: if_fxp.c,v 1.67 1999/04/16 21:22:51 peter Exp $ */ /* @@ -556,7 +556,8 @@ fxp_attach(device_t dev) goto fail; } - error = bus_setup_intr(dev, sc->irq, fxp_intr, sc, &sc->ih); + error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, + fxp_intr, sc, &sc->ih); if (error) { device_printf(dev, "could not setup irq\n"); goto fail; @@ -690,7 +691,6 @@ static device_method_t fxp_methods[] = { static driver_t fxp_driver = { "fxp", fxp_methods, - DRIVER_TYPE_NET, sizeof(struct fxp_softc), }; diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c index 7af9db71f632..cfcd10d14073 100644 --- a/sys/dev/iicbus/if_ic.c +++ b/sys/dev/iicbus/if_ic.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ic.c,v 1.2 1998/10/31 11:31:07 nsouch Exp $ + * $Id: if_ic.c,v 1.3 1998/12/07 21:58:16 archie Exp $ */ /* @@ -114,7 +114,6 @@ static device_method_t ic_methods[] = { static driver_t ic_driver = { "ic", ic_methods, - DRIVER_TYPE_MISC, sizeof(struct ic_softc), }; diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index 7925aa2bb43c..942d1b815f67 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iic.c,v 1.7 1999/02/13 18:01:55 nsouch Exp $ + * $Id: iic.c,v 1.8 1999/05/07 10:09:46 phk Exp $ * */ #include @@ -82,7 +82,6 @@ static device_method_t iic_methods[] = { static driver_t iic_driver = { "iic", iic_methods, - DRIVER_TYPE_MISC, sizeof(struct iic_softc), }; diff --git a/sys/dev/iicbus/iicbb.c b/sys/dev/iicbus/iicbb.c index 3b024543f3a4..1502ca4b23d5 100644 --- a/sys/dev/iicbus/iicbb.c +++ b/sys/dev/iicbus/iicbb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iicbb.c,v 1.2 1998/11/04 22:07:24 nsouch Exp $ + * $Id: iicbb.c,v 1.3 1999/01/28 15:50:24 roger Exp $ * */ @@ -102,7 +102,6 @@ static device_method_t iicbb_methods[] = { static driver_t iicbb_driver = { "iicbb", iicbb_methods, - DRIVER_TYPE_MISC, sizeof(struct iicbb_softc), }; diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index 12174a26e597..50e1dd19d51c 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iicbus.c,v 1.7 1999/01/09 18:08:24 nsouch Exp $ + * $Id: iicbus.c,v 1.8 1999/04/11 02:55:52 eivind Exp $ * */ @@ -114,7 +114,6 @@ static device_method_t iicbus_methods[] = { static driver_t iicbus_driver = { "iicbus", iicbus_methods, - DRIVER_TYPE_MISC, sizeof(struct iicbus_softc), }; diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c index 060c548d8a2f..4319ca0ba4c0 100644 --- a/sys/dev/iicbus/iicsmb.c +++ b/sys/dev/iicbus/iicsmb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: iicsmb.c,v 1.1.1.1 1998/09/03 20:51:50 nsouch Exp $ + * $Id: iicsmb.c,v 1.2 1998/10/31 11:31:07 nsouch Exp $ * */ @@ -130,7 +130,6 @@ static device_method_t iicsmb_methods[] = { static driver_t iicsmb_driver = { "iicsmb", iicsmb_methods, - DRIVER_TYPE_MISC, sizeof(struct iicsmb_softc), }; diff --git a/sys/dev/pcf/pcf.c b/sys/dev/pcf/pcf.c index 12ac372c356c..94d685be8f16 100644 --- a/sys/dev/pcf/pcf.c +++ b/sys/dev/pcf/pcf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pcf.c,v 1.7 1999/05/02 21:51:17 peter Exp $ + * $Id: pcf.c,v 1.8 1999/05/06 18:54:18 peter Exp $ * */ #include @@ -136,7 +136,6 @@ static device_method_t pcf_methods[] = { static driver_t pcf_driver = { "pcf", pcf_methods, - DRIVER_TYPE_MISC, sizeof(struct pcf_softc), }; diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index aa707ccd56bc..ae991fa9dd4a 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.98 1999/05/08 18:09:53 peter Exp $ + * $Id: pci.c,v 1.99 1999/05/08 20:28:01 peter Exp $ * */ @@ -931,7 +931,6 @@ compat_pci_handler(module_t mod, int type, void *data) bzero(driver, sizeof(driver_t)); driver->name = dvp->pd_name; driver->methods = pci_compat_methods; - driver->type = 0; /* XXX fixup in pci_map_int() */ driver->softc = sizeof(struct pci_devinfo *); driver->priv = dvp; devclass_add_driver(pci_devclass, driver); @@ -1373,7 +1372,6 @@ static device_method_t pci_methods[] = { static driver_t pci_driver = { "pci", pci_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/dev/ppbus/lpbb.c b/sys/dev/ppbus/lpbb.c index cd8ff244a0c6..e3ce6f0d2b56 100644 --- a/sys/dev/ppbus/lpbb.c +++ b/sys/dev/ppbus/lpbb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: lpbb.c,v 1.3 1998/12/07 21:58:16 archie Exp $ + * $Id: lpbb.c,v 1.4 1999/01/10 12:04:54 nsouch Exp $ * */ @@ -91,7 +91,6 @@ static device_method_t lpbb_methods[] = { static driver_t lpbb_driver = { "lpbb", lpbb_methods, - DRIVER_TYPE_MISC, sizeof(struct lpbb_softc), }; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index b9624eb579db..478ddc1720a8 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.232 1999/05/07 17:52:01 mjacob Exp $ + * $Id: sio.c,v 1.233 1999/05/07 23:08:04 mckusick Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -350,7 +350,6 @@ static device_method_t sio_methods[] = { static driver_t sio_driver = { driver_name, sio_methods, - DRIVER_TYPE_TTY|DRIVER_TYPE_FAST, sizeof(struct com_s), }; @@ -1135,8 +1134,9 @@ determined_type: ; res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, siointr, com, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, + INTR_TYPE_TTY | INTR_TYPE_FAST, + siointr, com, &ih); return (0); } diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index 8944e5d122d8..364661f8a9af 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: smb.c,v 1.8 1999/02/14 14:36:45 nsouch Exp $ + * $Id: smb.c,v 1.9 1999/05/07 10:09:50 phk Exp $ * */ #include @@ -83,7 +83,6 @@ static device_method_t smb_methods[] = { static driver_t smb_driver = { "smb", smb_methods, - DRIVER_TYPE_MISC, sizeof(struct smb_softc), }; diff --git a/sys/dev/smbus/smbus.c b/sys/dev/smbus/smbus.c index 4171a0f73cd5..cd16f3c58f50 100644 --- a/sys/dev/smbus/smbus.c +++ b/sys/dev/smbus/smbus.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: smbus.c,v 1.7 1999/01/09 18:08:24 nsouch Exp $ + * $Id: smbus.c,v 1.8 1999/02/13 17:57:19 nsouch Exp $ * */ #include @@ -88,7 +88,6 @@ static device_method_t smbus_methods[] = { static driver_t smbus_driver = { "smbus", smbus_methods, - DRIVER_TYPE_MISC, sizeof(struct smbus_softc), }; diff --git a/sys/dev/usb/ohci_pci.c b/sys/dev/usb/ohci_pci.c index 1aea5f1db15d..45add2621477 100644 --- a/sys/dev/usb/ohci_pci.c +++ b/sys/dev/usb/ohci_pci.c @@ -161,7 +161,8 @@ ohci_pci_attach(device_t dev) return ENOMEM; } - error = bus_setup_intr(dev, res, (driver_intr_t *) ohci_intr, sc, &ih); + error = bus_setup_intr(dev, res, INTR_TYPE_BIO, + (driver_intr_t *) ohci_intr, sc, &ih); if (error) { device_printf(dev, "could not setup irq\n"); return error; @@ -231,7 +232,6 @@ static device_method_t ohci_methods[] = { static driver_t ohci_driver = { "ohci", ohci_methods, - DRIVER_TYPE_BIO, sizeof(ohci_softc_t), }; diff --git a/sys/dev/usb/uhci_pci.c b/sys/dev/usb/uhci_pci.c index c00a6bf8b727..775ca44c8262 100644 --- a/sys/dev/usb/uhci_pci.c +++ b/sys/dev/usb/uhci_pci.c @@ -1,4 +1,4 @@ -/* FreeBSD $Id: uhci_pci.c,v 1.6 1999/04/16 21:22:53 peter Exp $ */ +/* FreeBSD $Id: uhci_pci.c,v 1.7 1999/05/01 23:30:06 n_hibma Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -158,7 +158,8 @@ uhci_pci_attach(device_t dev) return ENOMEM; } - error = bus_setup_intr(dev, res, (driver_intr_t *) uhci_intr, sc, &ih); + error = bus_setup_intr(dev, res, INTR_TYPE_BIO, + (driver_intr_t *) uhci_intr, sc, &ih); if (error) { device_printf(dev, "could not setup irq\n"); return error; @@ -245,7 +246,6 @@ static device_method_t uhci_methods[] = { static driver_t uhci_driver = { "uhci", uhci_methods, - DRIVER_TYPE_BIO, sizeof(uhci_softc_t), }; diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 2b189762babb..4863a1eaee37 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -99,7 +99,6 @@ static device_method_t uhubroot_methods[] = { static driver_t uhubroot_driver = { "uhub", uhubroot_methods, - DRIVER_TYPE_MISC, sizeof(struct uhub_softc) }; #endif diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 186695899e8a..87ed0d3db464 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -160,7 +160,6 @@ static device_method_t __CONCAT(dname,_methods)[] = { \ static driver_t __CONCAT(dname,_driver) = { \ #dname, \ __CONCAT(dname,_methods), \ - DRIVER_TYPE_MISC, \ sizeof(struct __CONCAT(dname,_softc)) \ } diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c index 808e369052f0..03e50a34c369 100644 --- a/sys/dev/vx/if_vx_eisa.c +++ b/sys/dev/vx/if_vx_eisa.c @@ -164,7 +164,7 @@ vx_eisa_attach(device_t dev) vxattach(sc); - if (bus_setup_intr(dev, irq, vxintr, sc, &ih)) { + if (bus_setup_intr(dev, irq, INTR_TYPE_NET, vxintr, sc, &ih)) { vxfree(sc); goto bad; } @@ -192,7 +192,6 @@ static device_method_t vx_eisa_methods[] = { static driver_t vx_eisa_driver = { "vx", vx_eisa_methods, - DRIVER_TYPE_NET, 1, /* unused */ }; diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index bb9dfbcb7f11..bacaec33eb2c 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.81 1999/05/06 01:07:03 luoqi Exp $ + * $Id: apm.c,v 1.82 1999/05/07 10:10:17 phk Exp $ */ #include "opt_devfs.h" @@ -1059,7 +1059,6 @@ static device_method_t apm_methods[] = { static driver_t apm_driver = { "apm", apm_methods, - DRIVER_TYPE_MISC, 1, /* no softc (XXX) */ }; diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index bb9dfbcb7f11..bacaec33eb2c 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.81 1999/05/06 01:07:03 luoqi Exp $ + * $Id: apm.c,v 1.82 1999/05/07 10:10:17 phk Exp $ */ #include "opt_devfs.h" @@ -1059,7 +1059,6 @@ static device_method_t apm_methods[] = { static driver_t apm_driver = { "apm", apm_methods, - DRIVER_TYPE_MISC, 1, /* no softc (XXX) */ }; diff --git a/sys/i386/eisa/3c5x9.c b/sys/i386/eisa/3c5x9.c index 8a961663ecd9..81ba5a24e223 100644 --- a/sys/i386/eisa/3c5x9.c +++ b/sys/i386/eisa/3c5x9.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: 3c5x9.c,v 1.10 1997/09/21 21:35:21 gibbs Exp $ + * $Id: 3c5x9.c,v 1.11 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -274,7 +274,7 @@ ep_eisa_attach(device_t dev) ep_attach(sc); - bus_setup_intr(dev, irq, ep_intr, sc, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_NET, ep_intr, sc, &ih); return 0; @@ -299,7 +299,6 @@ static device_method_t ep_eisa_methods[] = { static driver_t ep_eisa_driver = { "ep", ep_eisa_methods, - DRIVER_TYPE_NET, 1, /* unused */ }; diff --git a/sys/i386/eisa/adv_eisa.c b/sys/i386/eisa/adv_eisa.c index 465f6759b909..69a2a39fa05b 100644 --- a/sys/i386/eisa/adv_eisa.c +++ b/sys/i386/eisa/adv_eisa.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: adv_eisa.c,v 1.2 1998/12/22 18:14:09 gibbs Exp $ + * $Id: adv_eisa.c,v 1.3 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -316,7 +316,7 @@ adveisaattach(device_t dev) /* * Enable our interrupt handler. */ - bus_setup_intr(dev, irq, adv_intr, adv, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, adv_intr, adv, &ih); /* Attach sub-devices - always succeeds */ adv_attach(adv); @@ -342,7 +342,6 @@ static device_method_t adv_eisa_methods[] = { static driver_t adv_eisa_driver = { "adv", adv_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/i386/eisa/ahb.c b/sys/i386/eisa/ahb.c index 6e0db43941c9..86ba09be29ed 100644 --- a/sys/i386/eisa/ahb.c +++ b/sys/i386/eisa/ahb.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahb.c,v 1.10 1999/04/23 23:29:00 gibbs Exp $ + * $Id: ahb.c,v 1.11 1999/05/06 20:16:31 ken Exp $ */ #include "eisa.h" @@ -369,7 +369,7 @@ ahbattach(device_t dev) goto error_exit; /* Enable our interrupt */ - bus_setup_intr(dev, irq, ahbintr, ahb, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, ahbintr, ahb, &ih); return (0); error_exit: @@ -1347,7 +1347,6 @@ static device_method_t ahb_eisa_methods[] = { static driver_t ahb_eisa_driver = { "ahb", ahb_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/i386/eisa/ahc_eisa.c b/sys/i386/eisa/ahc_eisa.c index fe02ca638e84..e0c0c5119297 100644 --- a/sys/i386/eisa/ahc_eisa.c +++ b/sys/i386/eisa/ahc_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_eisa.c,v 1.6 1999/04/18 15:50:33 peter Exp $ + * $Id: ahc_eisa.c,v 1.7 1999/04/23 23:29:00 gibbs Exp $ */ #include "eisa.h" @@ -465,7 +465,6 @@ static device_method_t ahc_eisa_methods[] = { static driver_t ahc_eisa_driver = { "ahc", ahc_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/i386/eisa/bt_eisa.c b/sys/i386/eisa/bt_eisa.c index 19cdd8c55196..fc369c8251f2 100644 --- a/sys/i386/eisa/bt_eisa.c +++ b/sys/i386/eisa/bt_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_eisa.c,v 1.5 1999/04/20 09:53:05 dfr Exp $ + * $Id: bt_eisa.c,v 1.6 1999/04/24 06:46:10 peter Exp $ */ #include "eisa.h" @@ -333,7 +333,6 @@ static device_method_t bt_eisa_methods[] = { static driver_t bt_eisa_driver = { "bt", bt_eisa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/i386/eisa/dpt_eisa.c b/sys/i386/eisa/dpt_eisa.c index a8b24484d338..e38ea664136e 100644 --- a/sys/i386/eisa/dpt_eisa.c +++ b/sys/i386/eisa/dpt_eisa.c @@ -33,7 +33,7 @@ */ /* - * $Id: dpt_eisa.c,v 1.4 1998/09/15 08:33:35 gibbs Exp $ + * $Id: dpt_eisa.c,v 1.5 1999/04/18 15:50:33 peter Exp $ */ #include "eisa.h" @@ -174,7 +174,7 @@ dpt_eisa_attach(device_t dev) /* Register with the XPT */ dpt_attach(dpt); - bus_setup_intr(dev, irq, dpt_intr, dpt, &ih); + bus_setup_intr(dev, irq, INTR_TYPE_CAM, dpt_intr, dpt, &ih); splx(s); @@ -250,7 +250,6 @@ static device_method_t dpt_eisa_methods[] = { static driver_t dpt_eisa_driver = { "dpt", dpt_eisa_methods, - DRIVER_TYPE_CAM, 1, /* unused */ }; diff --git a/sys/i386/eisa/eisaconf.c b/sys/i386/eisa/eisaconf.c index d21964977274..d6142e06418a 100644 --- a/sys/i386/eisa/eisaconf.c +++ b/sys/i386/eisa/eisaconf.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: eisaconf.c,v 1.41 1999/04/19 13:34:25 peter Exp $ + * $Id: eisaconf.c,v 1.42 1999/05/06 22:17:26 peter Exp $ */ #include "opt_eisa.h" @@ -132,7 +132,6 @@ static device_method_t mainboard_methods[] = { static driver_t mainboard_driver = { "mainboard", mainboard_methods, - DRIVER_TYPE_MISC, 1, }; @@ -483,7 +482,6 @@ static device_method_t eisa_methods[] = { static driver_t eisa_driver = { "eisa", eisa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/i386/eisa/if_vx_eisa.c b/sys/i386/eisa/if_vx_eisa.c index 808e369052f0..03e50a34c369 100644 --- a/sys/i386/eisa/if_vx_eisa.c +++ b/sys/i386/eisa/if_vx_eisa.c @@ -164,7 +164,7 @@ vx_eisa_attach(device_t dev) vxattach(sc); - if (bus_setup_intr(dev, irq, vxintr, sc, &ih)) { + if (bus_setup_intr(dev, irq, INTR_TYPE_NET, vxintr, sc, &ih)) { vxfree(sc); goto bad; } @@ -192,7 +192,6 @@ static device_method_t vx_eisa_methods[] = { static driver_t vx_eisa_driver = { "vx", vx_eisa_methods, - DRIVER_TYPE_NET, 1, /* unused */ }; diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index 447b976a0b27..a42d4177aa67 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/legacy.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: nexus.c,v 1.6 1999/05/08 20:24:44 peter Exp $ + * $Id: nexus.c,v 1.7 1999/05/08 21:34:34 peter Exp $ */ /* @@ -88,7 +88,7 @@ static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); -static int nexus_setup_intr(device_t, device_t, struct resource *, +static int nexus_setup_intr(device_t, device_t, struct resource *, int flags, void (*)(void *), void *, void **); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); @@ -117,7 +117,6 @@ static device_method_t nexus_methods[] = { static driver_t nexus_driver = { "nexus", nexus_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; static devclass_t nexus_devclass; @@ -317,7 +316,7 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, */ static int nexus_setup_intr(device_t bus, device_t child, struct resource *irq, - void (*ihand)(void *), void *arg, void **cookiep) + int flags, void (*ihand)(void *), void *arg, void **cookiep) { intrmask_t *mask; driver_t *driver; @@ -335,24 +334,24 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq, icflags = INTR_EXCL; driver = device_get_driver(child); - switch (driver->type) { - case DRIVER_TYPE_TTY: + switch (flags) { + case INTR_TYPE_TTY: mask = &tty_imask; break; - case (DRIVER_TYPE_TTY | DRIVER_TYPE_FAST): + case (INTR_TYPE_TTY | INTR_TYPE_FAST): mask = &tty_imask; icflags |= INTR_FAST; break; - case DRIVER_TYPE_BIO: + case INTR_TYPE_BIO: mask = &bio_imask; break; - case DRIVER_TYPE_NET: + case INTR_TYPE_NET: mask = &net_imask; break; - case DRIVER_TYPE_CAM: + case INTR_TYPE_CAM: mask = &cam_imask; break; - case DRIVER_TYPE_MISC: + case INTR_TYPE_MISC: mask = 0; break; default: @@ -415,7 +414,6 @@ static device_method_t nexus_pcib_methods[] = { static driver_t nexus_pcib_driver = { "pcib", nexus_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 447b976a0b27..a42d4177aa67 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/nexus.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: nexus.c,v 1.6 1999/05/08 20:24:44 peter Exp $ + * $Id: nexus.c,v 1.7 1999/05/08 21:34:34 peter Exp $ */ /* @@ -88,7 +88,7 @@ static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); -static int nexus_setup_intr(device_t, device_t, struct resource *, +static int nexus_setup_intr(device_t, device_t, struct resource *, int flags, void (*)(void *), void *, void **); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); @@ -117,7 +117,6 @@ static device_method_t nexus_methods[] = { static driver_t nexus_driver = { "nexus", nexus_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; static devclass_t nexus_devclass; @@ -317,7 +316,7 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, */ static int nexus_setup_intr(device_t bus, device_t child, struct resource *irq, - void (*ihand)(void *), void *arg, void **cookiep) + int flags, void (*ihand)(void *), void *arg, void **cookiep) { intrmask_t *mask; driver_t *driver; @@ -335,24 +334,24 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq, icflags = INTR_EXCL; driver = device_get_driver(child); - switch (driver->type) { - case DRIVER_TYPE_TTY: + switch (flags) { + case INTR_TYPE_TTY: mask = &tty_imask; break; - case (DRIVER_TYPE_TTY | DRIVER_TYPE_FAST): + case (INTR_TYPE_TTY | INTR_TYPE_FAST): mask = &tty_imask; icflags |= INTR_FAST; break; - case DRIVER_TYPE_BIO: + case INTR_TYPE_BIO: mask = &bio_imask; break; - case DRIVER_TYPE_NET: + case INTR_TYPE_NET: mask = &net_imask; break; - case DRIVER_TYPE_CAM: + case INTR_TYPE_CAM: mask = &cam_imask; break; - case DRIVER_TYPE_MISC: + case INTR_TYPE_MISC: mask = 0; break; default: @@ -415,7 +414,6 @@ static device_method_t nexus_pcib_methods[] = { static driver_t nexus_pcib_driver = { "pcib", nexus_pcib_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/i386/isa/bt_isa.c b/sys/i386/isa/bt_isa.c index f2150a7ddc45..c9d52c3cc6a6 100644 --- a/sys/i386/isa/bt_isa.c +++ b/sys/i386/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.9 1999/04/18 19:08:28 peter Exp $ + * $Id: bt_isa.c,v 1.10 1999/04/24 06:48:27 peter Exp $ */ #include @@ -330,7 +330,6 @@ static device_method_t bt_isa_methods[] = { static driver_t bt_isa_driver = { "bt", bt_isa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c index f0a082f4c13d..197975b4807f 100644 --- a/sys/i386/isa/fd.c +++ b/sys/i386/isa/fd.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.140 1999/05/07 10:10:30 phk Exp $ + * $Id: fd.c,v 1.141 1999/05/08 18:13:14 peter Exp $ * */ @@ -606,8 +606,8 @@ fdc_probe(device_t dev) goto out; } fdc->dmachan = fdc->res_drq->r_start; - error = BUS_SETUP_INTR(device_get_parent(dev), dev, - fdc->res_irq, fdc_intr, fdc, &fdc->fdc_intr); + error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, + INTR_TYPE_BIO, fdc_intr, fdc, &fdc->fdc_intr); /* First - lets reset the floppy controller */ outb(fdc->baseport + FDOUT, 0); @@ -2333,7 +2333,6 @@ static device_method_t fdc_methods[] = { static driver_t fdc_driver = { "fdc", fdc_methods, - DRIVER_TYPE_BIO, sizeof(struct fdc_data) }; @@ -2354,7 +2353,6 @@ static device_method_t fd_methods[] = { static driver_t fd_driver = { "fd", fd_methods, - DRIVER_TYPE_BIO, sizeof(struct fd_data) }; diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index 5251c8018d71..512be7a798a3 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.123 1999/05/08 18:15:49 peter Exp $ + * $Id: isa.c,v 1.124 1999/05/08 21:28:39 peter Exp $ */ /* @@ -564,11 +564,11 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, * deal). */ static int -isa_setup_intr(device_t bus, device_t child, struct resource *r, +isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, void (*ihand)(void *), void *arg, void **cookiep) { - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, ihand, arg, - cookiep)); + return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, + ihand, arg, cookiep)); } static int @@ -604,7 +604,6 @@ static device_method_t isa_methods[] = { static driver_t isa_driver = { "isa", isa_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c index a42f80657832..e1959f6e50b9 100644 --- a/sys/i386/isa/isa_compat.c +++ b/sys/i386/isa/isa_compat.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa_compat.c,v 1.7 1999/04/26 12:49:39 peter Exp $ + * $Id: isa_compat.c,v 1.8 1999/05/08 18:20:03 peter Exp $ */ #include @@ -139,13 +139,15 @@ isa_compat_probe(device_t dev) { struct isa_device *dvp = device_get_softc(dev); struct isa_compat_resources res; + struct old_isa_driver *op; bzero(&res, sizeof(res)); /* * Fill in the isa_device fields. */ + op = device_get_driver(dev)->priv; dvp->id_id = isa_compat_nextid(); - dvp->id_driver = device_get_driver(dev)->priv; + dvp->id_driver = op->driver; dvp->id_iobase = isa_get_port(dev); dvp->id_irq = irqmask(isa_get_irq(dev)); dvp->id_drq = isa_get_drq(dev); @@ -207,10 +209,12 @@ isa_compat_attach(device_t dev) if (dvp->id_driver->attach) dvp->id_driver->attach(dvp); if (res.irq && dvp->id_irq && dvp->id_intr) { + struct old_isa_driver *op; void *ih; + op = device_get_driver(dev)->priv; error = BUS_SETUP_INTR(device_get_parent(dev), dev, - res.irq, + res.irq, op->type, dvp->id_intr, (void *)(uintptr_t)dvp->id_unit, &ih); @@ -247,9 +251,8 @@ isa_wrap_old_drivers(void) bzero(driver, sizeof(driver_t)); driver->name = op->driver->name; driver->methods = isa_compat_methods; - driver->type = op->type; driver->softc = sizeof(struct isa_device); - driver->priv = op->driver; + driver->priv = op; if (op->driver->sensitive_hw) resource_set_int(op->driver->name, -1, "sensitive", 1); devclass_add_driver(isa_devclass, driver); diff --git a/sys/i386/isa/isa_compat.h b/sys/i386/isa/isa_compat.h index 4615b38841ee..116ed10fc80d 100644 --- a/sys/i386/isa/isa_compat.h +++ b/sys/i386/isa/isa_compat.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa_compat.h,v 1.4 1999/04/24 04:21:42 kato Exp $ + * $Id: isa_compat.h,v 1.5 1999/05/08 14:36:47 phk Exp $ */ #include "vt.h" @@ -175,13 +175,13 @@ static struct old_isa_driver old_drivers[] = { /* Sensitive NET */ #if NED > 0 - { DRIVER_TYPE_NET, &eddriver }, + { INTR_TYPE_NET, &eddriver }, #endif #if NFE > 0 - { DRIVER_TYPE_NET, &fedriver }, + { INTR_TYPE_NET, &fedriver }, #endif #if NRDP > 0 - { DRIVER_TYPE_NET, &rdpdriver }, + { INTR_TYPE_NET, &rdpdriver }, #endif /* Sensitive CAM */ @@ -189,76 +189,76 @@ static struct old_isa_driver old_drivers[] = { /* TTY */ #if NVT > 0 - { DRIVER_TYPE_TTY, &vtdriver }, + { INTR_TYPE_TTY, &vtdriver }, #endif #if NMSE > 0 - { DRIVER_TYPE_TTY, &msedriver }, + { INTR_TYPE_TTY, &msedriver }, #endif #if NPCA > 0 - { DRIVER_TYPE_TTY, &pcadriver }, + { INTR_TYPE_TTY, &pcadriver }, #endif #if NGP > 0 - { DRIVER_TYPE_TTY, &gpdriver }, + { INTR_TYPE_TTY, &gpdriver }, #endif #if NGSC > 0 - { DRIVER_TYPE_TTY, &gscdriver }, + { INTR_TYPE_TTY, &gscdriver }, #endif #if NCY > 0 - { DRIVER_TYPE_TTY, &cydriver }, + { INTR_TYPE_TTY, &cydriver }, #endif #if NDGB > 0 - { DRIVER_TYPE_TTY, &dgbdriver }, + { INTR_TYPE_TTY, &dgbdriver }, #endif #if NDGM > 0 - { DRIVER_TYPE_TTY, &dgmdriver }, + { INTR_TYPE_TTY, &dgmdriver }, #endif #if NLABPC > 0 - { DRIVER_TYPE_TTY, &labpcdriver }, + { INTR_TYPE_TTY, &labpcdriver }, #endif #if NRCD > 0 - { DRIVER_TYPE_TTY, &rcdriver }, + { INTR_TYPE_TTY, &rcdriver }, #endif #if NRP > 0 - { DRIVER_TYPE_TTY, &rpdriver }, + { INTR_TYPE_TTY, &rpdriver }, #endif #if NTW > 0 - { DRIVER_TYPE_TTY, &twdriver }, + { INTR_TYPE_TTY, &twdriver }, #endif #if NSI > 0 - { DRIVER_TYPE_TTY, &sidriver }, + { INTR_TYPE_TTY, &sidriver }, #endif #if NASC > 0 - { DRIVER_TYPE_TTY, &ascdriver }, + { INTR_TYPE_TTY, &ascdriver }, #endif #if NSTL > 0 - { DRIVER_TYPE_TTY, &stldriver }, + { INTR_TYPE_TTY, &stldriver }, #endif #if NSTLI > 0 - { DRIVER_TYPE_TTY, &stlidriver }, + { INTR_TYPE_TTY, &stlidriver }, #endif #if NLORAN > 0 - { DRIVER_TYPE_TTY, &lorandriver }, + { INTR_TYPE_TTY, &lorandriver }, #endif #if NPPC > 0 - { DRIVER_TYPE_TTY, &ppcdriver }, + { INTR_TYPE_TTY, &ppcdriver }, #endif /* BIO */ #if NWDC > 0 - { DRIVER_TYPE_BIO, &wdcdriver }, + { INTR_TYPE_BIO, &wdcdriver }, #endif #if NMCD > 0 - { DRIVER_TYPE_BIO, &mcddriver }, + { INTR_TYPE_BIO, &mcddriver }, #endif #if NSCD > 0 - { DRIVER_TYPE_BIO, &scddriver }, + { INTR_TYPE_BIO, &scddriver }, #endif #if NMATCD > 0 - { DRIVER_TYPE_BIO, &matcddriver }, + { INTR_TYPE_BIO, &matcddriver }, #endif #if NWT > 0 - { DRIVER_TYPE_BIO, &wtdriver }, + { INTR_TYPE_BIO, &wtdriver }, #endif #if NFLA > 0 { DRIVER_TYPE_MISC, &fladriver }, @@ -267,130 +267,130 @@ static struct old_isa_driver old_drivers[] = { /* NET */ #if NIE > 0 - { DRIVER_TYPE_NET, &iedriver }, + { INTR_TYPE_NET, &iedriver }, #endif #if NEP > 0 - { DRIVER_TYPE_NET, &epdriver }, + { INTR_TYPE_NET, &epdriver }, #endif #if NEX > 0 - { DRIVER_TYPE_NET, &exdriver }, + { INTR_TYPE_NET, &exdriver }, #endif #if NLE > 0 - { DRIVER_TYPE_NET, &ledriver }, + { INTR_TYPE_NET, &ledriver }, #endif #if NLNC > 0 - { DRIVER_TYPE_NET, &lncdriver }, + { INTR_TYPE_NET, &lncdriver }, #endif #if NZE > 0 - { DRIVER_TYPE_NET, &zedriver }, + { INTR_TYPE_NET, &zedriver }, #endif #if NZP > 0 - { DRIVER_TYPE_NET, &zpdriver }, + { INTR_TYPE_NET, &zpdriver }, #endif #if NCS > 0 - { DRIVER_TYPE_NET, &csdriver }, + { INTR_TYPE_NET, &csdriver }, #endif #if NAR > 0 - { DRIVER_TYPE_NET, &ardriver }, + { INTR_TYPE_NET, &ardriver }, #endif #if NCX > 0 - { DRIVER_TYPE_NET, &cxdriver }, + { INTR_TYPE_NET, &cxdriver }, #endif #if NEL > 0 - { DRIVER_TYPE_NET, &eldriver }, + { INTR_TYPE_NET, &eldriver }, #endif #if NSR > 0 - { DRIVER_TYPE_NET, &srdriver }, + { INTR_TYPE_NET, &srdriver }, #endif #if NWL > 0 - { DRIVER_TYPE_NET, &wldriver }, + { INTR_TYPE_NET, &wldriver }, #endif #if NPCF > 0 - { DRIVER_TYPE_NET, &pcfdriver }, + { INTR_TYPE_NET, &pcfdriver }, #endif #if NISIC > 0 - { DRIVER_TYPE_NET, &isicdriver }, + { INTR_TYPE_NET, &isicdriver }, #endif #if NTINA > 0 - { DRIVER_TYPE_NET, &tinadriver }, + { INTR_TYPE_NET, &tinadriver }, #endif /* CAM */ #ifndef PC98 #if NADV > 0 - { DRIVER_TYPE_CAM, &advdriver }, + { INTR_TYPE_CAM, &advdriver }, #endif #endif #if NAHA > 0 - { DRIVER_TYPE_CAM, &ahadriver }, + { INTR_TYPE_CAM, &ahadriver }, #endif #ifdef PC98 #if NBS > 0 - { DRIVER_TYPE_CAM, &bsdriver }, + { INTR_TYPE_CAM, &bsdriver }, #endif #endif /* MISC */ #if NOLTR > 0 - { DRIVER_TYPE_MISC, &oltrdriver }, + { INTR_TYPE_MISC, &oltrdriver }, #endif #if NPCM > 0 - { DRIVER_TYPE_MISC, &pcmdriver }, + { INTR_TYPE_MISC, &pcmdriver }, #endif #if NPAS > 0 - { DRIVER_TYPE_MISC, &pasdriver }, + { INTR_TYPE_MISC, &pasdriver }, #endif #if NSB > 0 - { DRIVER_TYPE_MISC, &sbdriver }, + { INTR_TYPE_MISC, &sbdriver }, #endif #if NSBXVI > 0 - { DRIVER_TYPE_MISC, &sbxvidriver }, + { INTR_TYPE_MISC, &sbxvidriver }, #endif #if NSBMIDI > 0 - { DRIVER_TYPE_MISC, &sbmididriver }, + { INTR_TYPE_MISC, &sbmididriver }, #endif #if NAWE > 0 - { DRIVER_TYPE_MISC, &awedriver }, + { INTR_TYPE_MISC, &awedriver }, #endif #if NGUS > 0 - { DRIVER_TYPE_MISC, &gusdriver }, + { INTR_TYPE_MISC, &gusdriver }, #endif #if NMSS > 0 - { DRIVER_TYPE_MISC, &mssdriver }, + { INTR_TYPE_MISC, &mssdriver }, #endif #if NCSS > 0 - { DRIVER_TYPE_MISC, &cssdriver }, + { INTR_TYPE_MISC, &cssdriver }, #endif #if NSSCAPE > 0 - { DRIVER_TYPE_MISC, &sscapedriver }, + { INTR_TYPE_MISC, &sscapedriver }, #endif #if NTRIX > 0 - { DRIVER_TYPE_MISC, &trixdriver }, + { INTR_TYPE_MISC, &trixdriver }, #endif #if NSSCAPE > 0 - { DRIVER_TYPE_MISC, &sscape_mssdriver }, + { INTR_TYPE_MISC, &sscape_mssdriver }, #endif #if NOPL > 0 - { DRIVER_TYPE_MISC, &opldriver }, + { INTR_TYPE_MISC, &opldriver }, #endif #if NMPU > 0 - { DRIVER_TYPE_MISC, &mpudriver }, + { INTR_TYPE_MISC, &mpudriver }, #endif #if NUART > 0 - { DRIVER_TYPE_MISC, &uartdriver }, + { INTR_TYPE_MISC, &uartdriver }, #endif #if NCTX > 0 - { DRIVER_TYPE_MISC, &ctxdriver }, + { INTR_TYPE_MISC, &ctxdriver }, #endif #if NSPIGOT > 0 - { DRIVER_TYPE_MISC, &spigotdriver }, + { INTR_TYPE_MISC, &spigotdriver }, #endif #if NJOY > 0 - { DRIVER_TYPE_MISC, &joydriver }, + { INTR_TYPE_MISC, &joydriver }, #endif }; diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 2d50255d2434..063f7ce11095 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.69 1999/05/06 12:47:21 peter Exp $ + * $Id: npx.c,v 1.70 1999/05/08 18:14:09 peter Exp $ */ #include "npx.h" @@ -363,7 +363,8 @@ npx_probe1(dev) if (r == 0) panic("npx: can't get IRQ"); BUS_SETUP_INTR(device_get_parent(dev), - dev, r, npx_intr, 0, &intr); + dev, r, INTR_TYPE_MISC, + npx_intr, 0, &intr); if (intr == 0) panic("npx: can't create intr"); @@ -717,7 +718,6 @@ static device_method_t npx_methods[] = { static driver_t npx_driver = { "npx", npx_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/i386/isa/pcf.c b/sys/i386/isa/pcf.c index 12ac372c356c..94d685be8f16 100644 --- a/sys/i386/isa/pcf.c +++ b/sys/i386/isa/pcf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pcf.c,v 1.7 1999/05/02 21:51:17 peter Exp $ + * $Id: pcf.c,v 1.8 1999/05/06 18:54:18 peter Exp $ * */ #include @@ -136,7 +136,6 @@ static device_method_t pcf_methods[] = { static driver_t pcf_driver = { "pcf", pcf_methods, - DRIVER_TYPE_MISC, sizeof(struct pcf_softc), }; diff --git a/sys/isa/atkbd_isa.c b/sys/isa/atkbd_isa.c index 1d7ee623dd3b..89426819fc23 100644 --- a/sys/isa/atkbd_isa.c +++ b/sys/isa/atkbd_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd_isa.c,v 1.2 1999/03/10 10:36:49 yokota Exp $ + * $Id: atkbd_isa.c,v 1.3 1999/04/16 21:22:34 peter Exp $ */ #include "atkbd.h" @@ -64,7 +64,6 @@ static device_method_t atkbd_methods[] = { static driver_t atkbd_driver = { ATKBD_DRIVER_NAME, atkbd_methods, - DRIVER_TYPE_TTY, sizeof(atkbd_softc_t), }; @@ -111,8 +110,8 @@ atkbdattach(device_t dev) /* declare our interrupt handler */ res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, atkbd_isa_intr, sc, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, + atkbd_isa_intr, sc, &ih); return 0; } diff --git a/sys/isa/atkbdc_isa.c b/sys/isa/atkbdc_isa.c index 8e5a62b9bc09..5342c52756c6 100644 --- a/sys/isa/atkbdc_isa.c +++ b/sys/isa/atkbdc_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbdc_isa.c,v 1.2 1999/04/16 23:39:15 peter Exp $ + * $Id: atkbdc_isa.c,v 1.3 1999/05/08 20:25:38 peter Exp $ */ #include "atkbdc.h" @@ -82,7 +82,6 @@ static device_method_t atkbdc_methods[] = { static driver_t atkbdc_driver = { ATKBDC_DRIVER_NAME, atkbdc_methods, - DRIVER_TYPE_MISC, sizeof(atkbdc_softc_t *), }; diff --git a/sys/isa/bt_isa.c b/sys/isa/bt_isa.c index f2150a7ddc45..c9d52c3cc6a6 100644 --- a/sys/isa/bt_isa.c +++ b/sys/isa/bt_isa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_isa.c,v 1.9 1999/04/18 19:08:28 peter Exp $ + * $Id: bt_isa.c,v 1.10 1999/04/24 06:48:27 peter Exp $ */ #include @@ -330,7 +330,6 @@ static device_method_t bt_isa_methods[] = { static driver_t bt_isa_driver = { "bt", bt_isa_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/isa/fd.c b/sys/isa/fd.c index f0a082f4c13d..197975b4807f 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.140 1999/05/07 10:10:30 phk Exp $ + * $Id: fd.c,v 1.141 1999/05/08 18:13:14 peter Exp $ * */ @@ -606,8 +606,8 @@ fdc_probe(device_t dev) goto out; } fdc->dmachan = fdc->res_drq->r_start; - error = BUS_SETUP_INTR(device_get_parent(dev), dev, - fdc->res_irq, fdc_intr, fdc, &fdc->fdc_intr); + error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq, + INTR_TYPE_BIO, fdc_intr, fdc, &fdc->fdc_intr); /* First - lets reset the floppy controller */ outb(fdc->baseport + FDOUT, 0); @@ -2333,7 +2333,6 @@ static device_method_t fdc_methods[] = { static driver_t fdc_driver = { "fdc", fdc_methods, - DRIVER_TYPE_BIO, sizeof(struct fdc_data) }; @@ -2354,7 +2353,6 @@ static device_method_t fd_methods[] = { static driver_t fd_driver = { "fd", fd_methods, - DRIVER_TYPE_BIO, sizeof(struct fd_data) }; diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 70361ffc1c9c..c6f69a7cbc71 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.5 1999/04/18 15:12:11 peter Exp $ + * $Id: psm.c,v 1.6 1999/05/07 10:10:40 phk Exp $ */ /* @@ -305,7 +305,6 @@ static device_method_t psm_methods[] = { static driver_t psm_driver = { "psm", psm_methods, - DRIVER_TYPE_TTY, sizeof(struct psm_softc), }; @@ -1082,8 +1081,8 @@ psmattach(device_t dev) BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_IRQ, &irq); res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, psmintr, sc, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY, + psmintr, sc, &ih); return (0); } diff --git a/sys/isa/sio.c b/sys/isa/sio.c index b9624eb579db..478ddc1720a8 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.232 1999/05/07 17:52:01 mjacob Exp $ + * $Id: sio.c,v 1.233 1999/05/07 23:08:04 mckusick Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -350,7 +350,6 @@ static device_method_t sio_methods[] = { static driver_t sio_driver = { driver_name, sio_methods, - DRIVER_TYPE_TTY|DRIVER_TYPE_FAST, sizeof(struct com_s), }; @@ -1135,8 +1134,9 @@ determined_type: ; res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE); - BUS_SETUP_INTR(device_get_parent(dev), dev, res, siointr, com, - &ih); + BUS_SETUP_INTR(device_get_parent(dev), dev, res, + INTR_TYPE_TTY | INTR_TYPE_FAST, + siointr, com, &ih); return (0); } diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c index e837cab5e3ed..70391e54a1e6 100644 --- a/sys/isa/syscons_isa.c +++ b/sys/isa/syscons_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons_isa.c,v 1.1 1999/01/23 16:53:30 dfr Exp $ + * $Id: syscons_isa.c,v 1.2 1999/04/16 21:22:35 peter Exp $ */ #include "sc.h" @@ -61,7 +61,6 @@ static device_method_t sc_methods[] = { static driver_t sc_driver = { "sc", sc_methods, - DRIVER_TYPE_TTY, 1, /* XXX */ }; diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c index e198f39cc1e5..e4fa79ba36d3 100644 --- a/sys/isa/vga_isa.c +++ b/sys/isa/vga_isa.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: vga_isa.c,v 1.5 1999/04/16 23:54:24 peter Exp $ + * $Id: vga_isa.c,v 1.6 1999/05/08 20:20:18 peter Exp $ */ #include "vga.h" @@ -90,7 +90,6 @@ static device_method_t isavga_methods[] = { static driver_t isavga_driver = { DRIVER_NAME, isavga_methods, - DRIVER_TYPE_TTY, sizeof(isavga_softc_t), }; diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 191906b943cc..d7c9cd4a8501 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id: bus_if.m,v 1.6 1999/03/29 08:54:19 dfr Exp $ +# $Id: bus_if.m,v 1.7 1999/04/16 21:22:37 peter Exp $ # INTERFACE bus; @@ -147,6 +147,7 @@ METHOD int setup_intr { device_t dev; device_t child; struct resource *irq; + int flags; driver_intr_t *intr; void *arg; void **cookiep; diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 7e79e3ddcdbf..c9281f5d6924 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: subr_bus.c,v 1.18 1999/04/19 19:39:08 peter Exp $ + * $Id: subr_bus.c,v 1.19 1999/05/08 18:08:59 peter Exp $ */ #include @@ -1655,12 +1655,13 @@ bus_generic_driver_added(device_t dev, driver_t *driver) int bus_generic_setup_intr(device_t dev, device_t child, struct resource *irq, - driver_intr_t *intr, void *arg, void **cookiep) + int flags, driver_intr_t *intr, void *arg, + void **cookiep) { /* Propagate up the bus hierarchy until someone handles it. */ if (dev->parent) - return (BUS_SETUP_INTR(dev->parent, child, irq, intr, arg, - cookiep)); + return (BUS_SETUP_INTR(dev->parent, child, irq, flags, + intr, arg, cookiep)); else return (EINVAL); } @@ -1767,12 +1768,13 @@ bus_release_resource(device_t dev, int type, int rid, struct resource *r) } int -bus_setup_intr(device_t dev, struct resource *r, +bus_setup_intr(device_t dev, struct resource *r, int flags, driver_intr_t handler, void *arg, void **cookiep) { if (dev->parent == 0) return (EINVAL); - return (BUS_SETUP_INTR(dev->parent, dev, r, handler, arg, cookiep)); + return (BUS_SETUP_INTR(dev->parent, dev, r, flags, + handler, arg, cookiep)); } int @@ -1816,7 +1818,6 @@ static device_method_t root_methods[] = { static driver_t root_driver = { "root", root_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c index 818e491f9ad7..7f8fd69898c7 100644 --- a/sys/pci/ahc_pci.c +++ b/sys/pci/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.8 1999/03/23 07:26:41 gibbs Exp $ + * $Id: ahc_pci.c,v 1.9 1999/04/23 23:30:21 gibbs Exp $ */ #include @@ -162,7 +162,6 @@ static device_method_t ahc_pci_methods[] = { static driver_t ahc_pci_driver = { "ahc", ahc_pci_methods, - DRIVER_TYPE_CAM, sizeof(struct ahc_softc) }; diff --git a/sys/pci/alpm.c b/sys/pci/alpm.c index ce6f08d27705..4930fe317329 100644 --- a/sys/pci/alpm.c +++ b/sys/pci/alpm.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: alpm.c,v 1.1 1999/02/13 17:51:46 nsouch Exp $ + * $Id: alpm.c,v 1.2 1999/04/24 20:13:58 peter Exp $ * */ @@ -190,7 +190,6 @@ static device_method_t alsmb_methods[] = { static driver_t alsmb_driver = { "alsmb", alsmb_methods, - DRIVER_TYPE_MISC, sizeof(struct alsmb_softc), }; diff --git a/sys/pci/bt848_i2c.c b/sys/pci/bt848_i2c.c index 176d069a837f..63ea8d050387 100644 --- a/sys/pci/bt848_i2c.c +++ b/sys/pci/bt848_i2c.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt848_i2c.c,v 1.1 1998/10/31 11:26:38 nsouch Exp $ + * $Id: bt848_i2c.c,v 1.2 1998/11/07 14:30:48 nsouch Exp $ * */ @@ -129,7 +129,6 @@ static device_method_t bti2c_methods[] = { static driver_t bti2c_driver = { "bti2c", bti2c_methods, - DRIVER_TYPE_MISC, sizeof(struct bti2c_softc), }; diff --git a/sys/pci/bt_pci.c b/sys/pci/bt_pci.c index c5dd8426ca79..b126364d9658 100644 --- a/sys/pci/bt_pci.c +++ b/sys/pci/bt_pci.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_pci.c,v 1.5 1999/04/18 15:50:35 peter Exp $ + * $Id: bt_pci.c,v 1.6 1999/04/23 23:30:22 gibbs Exp $ */ #include "pci.h" @@ -224,7 +224,6 @@ static device_method_t bt_pci_methods[] = { static driver_t bt_pci_driver = { "bt", bt_pci_methods, - DRIVER_TYPE_CAM, sizeof(struct bt_softc), }; diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index 53b8d4db00c6..4d7d5ef0d9d7 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.66 1999/03/20 04:51:25 wes Exp $ + * $Id: if_fxp.c,v 1.67 1999/04/16 21:22:51 peter Exp $ */ /* @@ -556,7 +556,8 @@ fxp_attach(device_t dev) goto fail; } - error = bus_setup_intr(dev, sc->irq, fxp_intr, sc, &sc->ih); + error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, + fxp_intr, sc, &sc->ih); if (error) { device_printf(dev, "could not setup irq\n"); goto fail; @@ -690,7 +691,6 @@ static device_method_t fxp_methods[] = { static driver_t fxp_driver = { "fxp", fxp_methods, - DRIVER_TYPE_NET, sizeof(struct fxp_softc), }; diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 3ddf52cf70a3..40705f8f4878 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: intpm.c,v 1.7 1999/05/06 22:04:21 peter Exp $ + * $Id: intpm.c,v 1.8 1999/05/07 18:03:26 peter Exp $ */ #include "pci.h" @@ -137,7 +137,6 @@ struct intsmb_softc{ static driver_t intpm_driver = { "intsmb", intpm_methods, - DRIVER_TYPE_MISC, sizeof(struct intsmb_softc), }; diff --git a/sys/pci/ohci_pci.c b/sys/pci/ohci_pci.c index 1aea5f1db15d..45add2621477 100644 --- a/sys/pci/ohci_pci.c +++ b/sys/pci/ohci_pci.c @@ -161,7 +161,8 @@ ohci_pci_attach(device_t dev) return ENOMEM; } - error = bus_setup_intr(dev, res, (driver_intr_t *) ohci_intr, sc, &ih); + error = bus_setup_intr(dev, res, INTR_TYPE_BIO, + (driver_intr_t *) ohci_intr, sc, &ih); if (error) { device_printf(dev, "could not setup irq\n"); return error; @@ -231,7 +232,6 @@ static device_method_t ohci_methods[] = { static driver_t ohci_driver = { "ohci", ohci_methods, - DRIVER_TYPE_BIO, sizeof(ohci_softc_t), }; diff --git a/sys/pci/pci.c b/sys/pci/pci.c index aa707ccd56bc..ae991fa9dd4a 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.98 1999/05/08 18:09:53 peter Exp $ + * $Id: pci.c,v 1.99 1999/05/08 20:28:01 peter Exp $ * */ @@ -931,7 +931,6 @@ compat_pci_handler(module_t mod, int type, void *data) bzero(driver, sizeof(driver_t)); driver->name = dvp->pd_name; driver->methods = pci_compat_methods; - driver->type = 0; /* XXX fixup in pci_map_int() */ driver->softc = sizeof(struct pci_devinfo *); driver->priv = dvp; devclass_add_driver(pci_devclass, driver); @@ -1373,7 +1372,6 @@ static device_method_t pci_methods[] = { static driver_t pci_driver = { "pci", pci_methods, - DRIVER_TYPE_MISC, 1, /* no softc */ }; diff --git a/sys/pci/pci_compat.c b/sys/pci/pci_compat.c index a34a19ca61d0..5803bceb96ed 100644 --- a/sys/pci/pci_compat.c +++ b/sys/pci/pci_compat.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci_compat.c,v 1.24 1999/04/24 19:55:41 peter Exp $ + * $Id: pci_compat.c,v 1.25 1999/05/07 16:33:08 peter Exp $ * */ @@ -163,10 +163,11 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, #endif if (cfg->intpin != 0) { int irq = cfg->intline; - driver_t *driver = device_get_driver(cfg->dev); int rid = 0; struct resource *res; + int flags = 0; void *ih; + res = bus_alloc_resource(cfg->dev, SYS_RES_IRQ, &rid, irq, irq, 1, RF_SHAREABLE|RF_ACTIVE); if (!res) { @@ -175,19 +176,19 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, } /* - * This is ugly. Translate the mask into a driver type. + * This is ugly. Translate the mask into an interrupt type. */ if (maskptr == &tty_imask) - driver->type |= DRIVER_TYPE_TTY; + flags = INTR_TYPE_TTY; else if (maskptr == &bio_imask) - driver->type |= DRIVER_TYPE_BIO; + flags = INTR_TYPE_BIO; else if (maskptr == &net_imask) - driver->type |= DRIVER_TYPE_NET; + flags = INTR_TYPE_NET; else if (maskptr == &cam_imask) - driver->type |= DRIVER_TYPE_CAM; + flags = INTR_TYPE_CAM; error = BUS_SETUP_INTR(device_get_parent(cfg->dev), cfg->dev, - res, handler, arg, &ih); + res, flags, handler, arg, &ih); if (error != 0) return 0; @@ -237,8 +238,8 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, return 0; } error = BUS_SETUP_INTR(device_get_parent(cfg->dev), - cfg->dev, res, handler, arg, - &ih); + cfg->dev, res, flags, + handler, arg, &ih); if (error != 0) { printf("pci_map_int: BUS_SETUP_INTR failed\n"); return 0; diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index 9fd06e13c0a8..99d22b3d3a0c 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcisupport.c,v 1.105 1999/05/08 15:45:25 peter Exp $ +** $Id: pcisupport.c,v 1.106 1999/05/08 21:30:38 peter Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -850,7 +850,6 @@ static device_method_t pcib_methods[] = { static driver_t pcib_driver = { "pcib", pcib_methods, - DRIVER_TYPE_MISC, 1, }; @@ -991,7 +990,6 @@ static device_method_t isab_methods[] = { static driver_t isab_driver = { "isab", isab_methods, - DRIVER_TYPE_MISC, 1, }; @@ -1192,7 +1190,6 @@ static device_method_t chip_methods[] = { static driver_t chip_driver = { "chip", chip_methods, - DRIVER_TYPE_MISC, 1, }; @@ -1538,7 +1535,6 @@ static device_method_t vga_methods[] = { static driver_t vga_driver = { "vga", vga_methods, - DRIVER_TYPE_MISC, 1, }; @@ -1582,7 +1578,6 @@ static device_method_t ign_methods[] = { static driver_t ign_driver = { "ign", ign_methods, - DRIVER_TYPE_MISC, 1, }; diff --git a/sys/pci/uhci_pci.c b/sys/pci/uhci_pci.c index c00a6bf8b727..775ca44c8262 100644 --- a/sys/pci/uhci_pci.c +++ b/sys/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* FreeBSD $Id: uhci_pci.c,v 1.6 1999/04/16 21:22:53 peter Exp $ */ +/* FreeBSD $Id: uhci_pci.c,v 1.7 1999/05/01 23:30:06 n_hibma Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -158,7 +158,8 @@ uhci_pci_attach(device_t dev) return ENOMEM; } - error = bus_setup_intr(dev, res, (driver_intr_t *) uhci_intr, sc, &ih); + error = bus_setup_intr(dev, res, INTR_TYPE_BIO, + (driver_intr_t *) uhci_intr, sc, &ih); if (error) { device_printf(dev, "could not setup irq\n"); return error; @@ -245,7 +246,6 @@ static device_method_t uhci_methods[] = { static driver_t uhci_driver = { "uhci", uhci_methods, - DRIVER_TYPE_BIO, sizeof(uhci_softc_t), }; diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 9f133f5a47b8..e7063de346d6 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bus.h,v 1.12 1999/05/07 10:11:22 phk Exp $ + * $Id: bus.h,v 1.13 1999/05/08 18:07:37 peter Exp $ */ #ifndef _SYS_BUS_H_ @@ -52,14 +52,14 @@ typedef void driver_intr_t(void*); * indicate. Buses which do interrupt remapping will want to * change their type to reflect what sort of devices are underneath. */ -typedef enum driver_type { - DRIVER_TYPE_TTY = 1, - DRIVER_TYPE_BIO = 2, - DRIVER_TYPE_NET = 4, - DRIVER_TYPE_CAM = 8, - DRIVER_TYPE_MISC = 16, - DRIVER_TYPE_FAST = 128 -} driver_type_t; +enum intr_type { + INTR_TYPE_TTY = 1, + INTR_TYPE_BIO = 2, + INTR_TYPE_NET = 4, + INTR_TYPE_CAM = 8, + INTR_TYPE_MISC = 16, + INTR_TYPE_FAST = 128 +}; typedef int (*devop_t)(void); @@ -71,7 +71,6 @@ struct device_method { struct driver { const char *name; /* driver name */ device_method_t *methods; /* method table */ - driver_type_t type; size_t softc; /* size of device softc struct */ void *priv; /* driver private data */ device_ops_t ops; /* compiled method table */ @@ -115,7 +114,7 @@ int bus_generic_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); int bus_generic_resume(device_t dev); int bus_generic_setup_intr(device_t dev, device_t child, - struct resource *irq, + struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep); int bus_generic_shutdown(device_t dev); int bus_generic_suspend(device_t dev); @@ -137,7 +136,7 @@ int bus_deactivate_resource(device_t dev, int type, int rid, struct resource *r); int bus_release_resource(device_t dev, int type, int rid, struct resource *r); -int bus_setup_intr(device_t dev, struct resource *r, +int bus_setup_intr(device_t dev, struct resource *r, int flags, driver_intr_t handler, void *arg, void **cookiep); int bus_teardown_intr(device_t dev, struct resource *r, void *cookie);