summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhci.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-08-07 23:51:37 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-08-07 23:51:37 +0000
commit59d4db73bf3f28cdb981d1f5b17c500843420e66 (patch)
tree0d4fc315ee6cb40fe85aeb76e689414f1f1854a4 /sys/dev/usb/uhci.c
parent7b027458c9e5777ab1f75d74ac63fd97810373db (diff)
Make all *_device_*_start() functions (e.g. ohci_device_intr_start())
wait for an interrupt when the bus is in polling mode. Otherwise some devices like my YE-Data USB Floppy take a short sharp trip to ddb> at 'halt -p'. Most of the functions were already doing the wait. ok miod@. With modification that printf's become DPRINTF's.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r--sys/dev/usb/uhci.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 2601b65b84e..a84586fb08f 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.90 2011/07/03 15:47:17 matthew Exp $ */
+/* $OpenBSD: uhci.c,v 1.91 2012/08/07 23:51:36 krw 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 $ */
@@ -1981,6 +1981,7 @@ uhci_device_ctrl_start(usbd_xfer_handle xfer)
if (sc->sc_bus.use_polling)
uhci_waitintr(sc, xfer);
+
return (USBD_IN_PROGRESS);
}
@@ -2077,6 +2078,9 @@ uhci_device_intr_start(usbd_xfer_handle xfer)
}
#endif
+ if (sc->sc_bus.use_polling)
+ uhci_waitintr(sc, xfer);
+
return (USBD_IN_PROGRESS);
}
@@ -2408,6 +2412,11 @@ uhci_device_isoc_start(usbd_xfer_handle xfer)
splx(s);
+ if (sc->sc_bus.use_polling) {
+ DPRINTF(("Starting ohci isoc xfer with polling. Bad idea?\n"));
+ uhci_waitintr(sc, xfer);
+ }
+
return (USBD_IN_PROGRESS);
}