Sat May 29 16:49:30 2021 UTC ()
xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms.

Better to use the named constant, and although the spec says 20 ms is
enough, apparently for some devices it's not.


(riastradh)
diff -r1.142 -r1.143 src/sys/dev/usb/xhci.c

cvs diff -r1.142 -r1.143 src/sys/dev/usb/xhci.c (expand / switch to context diff)
--- src/sys/dev/usb/xhci.c 2021/05/27 11:09:15 1.142
+++ src/sys/dev/usb/xhci.c 2021/05/29 16:49:30 1.143
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.142 2021/05/27 11:09:15 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.142 2021/05/27 11:09:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1027,7 +1027,7 @@
 				v |= XHCI_PS_LWS;
 				v |= XHCI_PS_PLS_SET(XHCI_PS_PLS_SETRESUME);
 				xhci_op_write_4(sc, port, v);
-				usb_delay_ms(&sc->sc_bus, 20);
+				usb_delay_ms(&sc->sc_bus, USB_RESUME_WAIT);
 			} else {
 				KASSERT(sc->sc_bus.ub_revision > USBREV_2_0);
 			}