summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-23 08:39:33 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-09-23 08:39:33 +0000
commitbd661c3b13fb381c0473eade3ec183588867ce42 (patch)
treea5ee02840db703ae703588e043301a041f76fe9c
parentda6b92de342708b2bdb157300eb90cbbfff0d218 (diff)
returning here can cause the usb task thread to go to sleep forever,
becaue it skips a wakeup() later on. this is the only error condition that returns before the wakeup. not sure why this particular case is handled differently, and not certain what the error code should be, but this is better than breaking all of usb because of a problem on one port. dicussed with deraadt
-rw-r--r--sys/dev/usb/ehci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 714b3f08de2..4f7fb9c26c6 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.110 2010/09/07 16:21:46 deraadt Exp $ */
+/* $OpenBSD: ehci.c,v 1.111 2010/09/23 08:39:32 jakemsr Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -2172,7 +2172,8 @@ ehci_root_ctrl_start(usbd_xfer_handle xfer)
if (v & EHCI_PS_PR) {
printf("%s: port reset timeout\n",
sc->sc_bus.bdev.dv_xname);
- return (USBD_TIMEOUT);
+ err = USBD_IOERROR;
+ goto ret;
}
if (!(v & EHCI_PS_PE)) {
/* Not a high speed device, give up ownership.*/