From bd661c3b13fb381c0473eade3ec183588867ce42 Mon Sep 17 00:00:00 2001 From: Jacob Meuser Date: Thu, 23 Sep 2010 08:39:33 +0000 Subject: 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 --- sys/dev/usb/ehci.c | 5 +++-- 1 file 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.*/ -- cgit v1.2.3