summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2005-04-21 12:30:03 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2005-04-21 12:30:03 +0000
commitc22d66b26f3773cfad5b2d27ee616cd0a0f5acb0 (patch)
tree68a275a5c02f3ae2be79b8c25310c31e4dc43bcf /sys/dev/usb
parent669cbf66fe301ad1daf2bd426cd98e85331933a6 (diff)
If the SMM driver had enabled ownership change interrupts, re-enable them
temporarily before we attempt to take control. ok dlg@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index b5bacd0cb82..fc46861693b 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.60 2005/04/21 10:00:30 pascoe Exp $ */
+/* $OpenBSD: ohci.c,v 1.61 2005/04/21 12:30:02 pascoe 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 $ */
@@ -758,12 +758,16 @@ ohci_init(ohci_softc_t *sc)
if (ctl & OHCI_IR) {
/* SMM active, request change */
DPRINTF(("ohci_init: SMM active, request owner change\n"));
+ if ((sc->sc_intre & (OHCI_OC | OHCI_MIE)) ==
+ (OHCI_OC | OHCI_MIE))
+ OWRITE4(sc, OHCI_INTERRUPT_ENABLE, OHCI_MIE);
s = OREAD4(sc, OHCI_COMMAND_STATUS);
OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR);
for (i = 0; i < 100 && (ctl & OHCI_IR); i++) {
usb_delay_ms(&sc->sc_bus, 1);
ctl = OREAD4(sc, OHCI_CONTROL);
}
+ OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_MIE);
if (ctl & OHCI_IR) {
printf("%s: SMM does not respond, resetting\n",
USBDEVNAME(sc->sc_bus.bdev));