summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ehci.c9
-rw-r--r--sys/dev/usb/ohci.c7
-rw-r--r--sys/dev/usb/uhci.c6
3 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 0b6392dfb7e..3bed1926127 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.49 2005/09/24 07:28:58 pascoe Exp $ */
+/* $OpenBSD: ehci.c,v 1.50 2005/10/04 22:55:30 brad Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -477,9 +477,6 @@ ehci_init(ehci_softc_t *sc)
lockinit(&sc->sc_doorbell_lock, PZERO, "ehcidb", 0, 0);
- /* Enable interrupts */
- EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
-
/* Turn on controller */
EOWRITE4(sc, EHCI_USBCMD,
EHCI_CMD_ITC_2 | /* 2 microframes */
@@ -502,6 +499,10 @@ ehci_init(ehci_softc_t *sc)
return (USBD_IOERROR);
}
+ /* Enable interrupts */
+ DPRINTFN(1,("ehci_init: enabling\n"));
+ EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs);
+
return (USBD_NORMAL_COMPLETION);
#if 0
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index fc46861693b..b4b3c9dc87f 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.61 2005/04/21 12:30:02 pascoe Exp $ */
+/* $OpenBSD: ohci.c,v 1.62 2005/10/04 22:55:30 brad Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -827,7 +827,6 @@ ohci_init(ohci_softc_t *sc)
OWRITE4(sc, OHCI_BULK_HEAD_ED, sc->sc_bulk_head->physaddr);
/* disable all interrupts and then switch on all desired interrupts */
OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS);
- OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE);
/* switch on desired functional features */
ctl = OREAD4(sc, OHCI_CONTROL);
ctl &= ~(OHCI_CBSR_MASK | OHCI_LES | OHCI_HCFS_MASK | OHCI_IR);
@@ -882,6 +881,10 @@ ohci_init(ohci_softc_t *sc)
usb_callout_init(sc->sc_tmo_rhsc);
+ /* Finally, turn on interrupts. */
+ DPRINTFN(1,("ohci_init: enabling\n"));
+ OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE);
+
return (USBD_NORMAL_COMPLETION);
bad5:
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index c04ec682c48..bad1eec9e77 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.38 2005/04/19 08:33:26 damien Exp $ */
+/* $OpenBSD: uhci.c,v 1.39 2005/10/04 22:55:30 brad Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -521,12 +521,12 @@ uhci_init(uhci_softc_t *sc)
sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc);
#endif
+ UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */
+
DPRINTFN(1,("uhci_init: enabling\n"));
UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE |
UHCI_INTR_IOCE | UHCI_INTR_SPIE); /* enable interrupts */
- UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */
-
return (uhci_run(sc, 1)); /* and here we go... */
}