summaryrefslogtreecommitdiff
path: root/sys/dev
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
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')
-rw-r--r--sys/dev/usb/ehci.c5
-rw-r--r--sys/dev/usb/ohci.c10
-rw-r--r--sys/dev/usb/uhci.c11
3 files changed, 22 insertions, 4 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index b4ba2f896ff..3049cc3a687 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.124 2012/07/07 12:54:04 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.125 2012/08/07 23:51:36 krw Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -3041,6 +3041,7 @@ ehci_device_ctrl_start(usbd_xfer_handle xfer)
if (sc->sc_bus.use_polling)
ehci_waitintr(sc, xfer);
+
return (USBD_IN_PROGRESS);
}
@@ -3883,7 +3884,7 @@ ehci_device_isoc_start(usbd_xfer_handle xfer)
splx(s);
if (sc->sc_bus.use_polling) {
- printf("Starting ehci isoc xfer with polling. Bad idea?\n");
+ DPRINTF(("Starting ohci isoc xfer with polling. Bad idea?\n"));
ehci_waitintr(sc, xfer);
}
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index b79e442f82c..c34f076ee7f 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.105 2011/09/18 18:29:20 krw Exp $ */
+/* $OpenBSD: ohci.c,v 1.106 2012/08/07 23:51:36 krw 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 $ */
@@ -3054,6 +3054,9 @@ ohci_device_intr_start(usbd_xfer_handle xfer)
#endif
splx(s);
+ if (sc->sc_bus.use_polling)
+ ohci_waitintr(sc, xfer);
+
return (USBD_IN_PROGRESS);
}
@@ -3334,6 +3337,11 @@ ohci_device_isoc_start(usbd_xfer_handle xfer)
/* XXX anything to do? */
+ if (sc->sc_bus.use_polling) {
+ DPRINTF(("Starting ohci isoc xfer with polling. Bad idea?\n"));
+ ohci_waitintr(sc, xfer);
+ }
+
return (USBD_IN_PROGRESS);
}
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);
}