svn commit: r264336 - stable/10/sys/dev/usb/controller
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Apr 11 06:13:56 UTC 2014
Author: hselasky
Date: Fri Apr 11 06:13:56 2014
New Revision: 264336
URL: http://svnweb.freebsd.org/changeset/base/264336
Log:
MFC r264294:
Fix for infinite XHCI reset loops when the set address USB request fails.
Modified:
stable/10/sys/dev/usb/controller/xhci.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/10/sys/dev/usb/controller/xhci.c Fri Apr 11 01:27:33 2014 (r264335)
+++ stable/10/sys/dev/usb/controller/xhci.c Fri Apr 11 06:13:56 2014 (r264336)
@@ -1218,8 +1218,20 @@ retry:
*/
if (timeout == 0 &&
xhci_reset_command_queue_locked(sc) == 0) {
- timeout = 1;
- goto retry;
+ temp = le32toh(trb->dwTrb3);
+
+ /*
+ * Avoid infinite XHCI reset loops if the set
+ * address command fails to respond due to a
+ * non-enumerating device:
+ */
+ if (XHCI_TRB_3_TYPE_GET(temp) == XHCI_TRB_TYPE_ADDRESS_DEVICE &&
+ (temp & XHCI_TRB_3_BSR_BIT) == 0) {
+ DPRINTF("Set address timeout\n");
+ } else {
+ timeout = 1;
+ goto retry;
+ }
} else {
DPRINTF("Controller reset!\n");
usb_bus_reset_async_locked(&sc->sc_bus);
More information about the svn-src-all
mailing list