diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 1999-09-27 18:08:00 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 1999-09-27 18:08:00 +0000 |
commit | 68ce6873fc3fc9c40a747f4db6d0857a0c174144 (patch) | |
tree | bed3ba0d03de36d0cd561db2c2be461491c27c9f | |
parent | 665e2d3eed98c780ba0039928b2a498dfe74a659 (diff) |
Disable ints. later; NetBSD.
-rw-r--r-- | sys/dev/pci/ohci_pci.c | 17 | ||||
-rw-r--r-- | sys/dev/pci/uhci_pci.c | 15 |
2 files changed, 17 insertions, 15 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c index 3efc32dc2b4..ea70fae80ec 100644 --- a/sys/dev/pci/ohci_pci.c +++ b/sys/dev/pci/ohci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_pci.c,v 1.4 1999/08/23 21:54:39 fgsch Exp $ */ +/* $OpenBSD: ohci_pci.c,v 1.5 1999/09/27 18:07:58 fgsch Exp $ */ /* $NetBSD: ohci_pci.c,v 1.9 1999/05/20 09:52:35 augustss Exp $ */ /* @@ -68,7 +68,8 @@ int ohci_pci_match __P((struct device *, void *, void *)); void ohci_pci_attach __P((struct device *, struct device *, void *)); struct cfattach ohci_pci_ca = { - sizeof(struct ohci_softc), ohci_pci_match, ohci_pci_attach + sizeof(struct ohci_softc), ohci_pci_match, ohci_pci_attach, + ohci_detach, ohci_activate }; int @@ -100,10 +101,6 @@ ohci_pci_attach(parent, self, aux) pcireg_t csr; usbd_status r; - /* Disable interrupts, so we don't can any spurious ones. */ - bus_space_write_4(sc->iot, sc->ioh, - OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS); - /* Map I/O registers */ if (pci_mapreg_map(pa, PCI_CBMEM, PCI_MAPREG_TYPE_MEM, 0, &sc->iot, &sc->ioh, NULL, NULL)) { @@ -111,7 +108,11 @@ ohci_pci_attach(parent, self, aux) return; } - sc->sc_dmatag = pa->pa_dmat; + /* Disable interrupts, so we don't can any spurious ones. */ + bus_space_write_4(sc->iot, sc->ioh, + OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS); + + sc->sc_bus.dmatag = pa->pa_dmat; /* Enable the device. */ csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); @@ -144,5 +145,5 @@ ohci_pci_attach(parent, self, aux) } /* Attach usb device. */ - config_found((void *)sc, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found((void *)sc, &sc->sc_bus, usbctlprint); } diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c index 3c69b8f5170..29de7e88b95 100644 --- a/sys/dev/pci/uhci_pci.c +++ b/sys/dev/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci_pci.c,v 1.3 1999/08/23 21:54:40 fgsch Exp $ */ +/* $OpenBSD: uhci_pci.c,v 1.4 1999/09/27 18:07:59 fgsch Exp $ */ /* $NetBSD: uhci_pci.c,v 1.7 1999/05/20 09:52:35 augustss Exp $ */ /* @@ -61,7 +61,8 @@ int uhci_pci_match __P((struct device *, void *, void *)); void uhci_pci_attach __P((struct device *, struct device *, void *)); struct cfattach uhci_pci_ca = { - sizeof(uhci_softc_t), uhci_pci_match, uhci_pci_attach + sizeof(uhci_softc_t), uhci_pci_match, uhci_pci_attach, + uhci_detach, uhci_activate }; int @@ -94,8 +95,6 @@ uhci_pci_attach(parent, self, aux) char *typestr; usbd_status r; - /* Disable interrupts, so we don't can any spurious ones. */ - bus_space_write_2(sc->iot, sc->ioh, UHCI_INTR, 0); /* Map I/O registers */ if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, @@ -104,7 +103,10 @@ uhci_pci_attach(parent, self, aux) return; } - sc->sc_dmatag = pa->pa_dmat; + /* Disable interrupts, so we don't can any spurious ones. */ + bus_space_write_2(sc->iot, sc->ioh, UHCI_INTR, 0); + + sc->sc_bus.dmatag = pa->pa_dmat; /* Enable the device. */ csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); @@ -117,7 +119,6 @@ uhci_pci_attach(parent, self, aux) printf(": couldn't map interrupt\n"); return; } - intrstr = pci_intr_string(pc, ih); sc->sc_ih = pci_intr_establish(pc, ih, IPL_USB, uhci_intr, sc, sc->sc_bus.bdev.dv_xname); @@ -151,5 +152,5 @@ uhci_pci_attach(parent, self, aux) } /* Attach usb device. */ - config_found((void *)sc, &sc->sc_bus, usbctlprint); + sc->sc_child = config_found((void *)sc, &sc->sc_bus, usbctlprint); } |