Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms.



details:   https://anonhg.NetBSD.org/src/rev/2960d3c038e5
branches:  trunk
changeset: 983562:2960d3c038e5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat May 29 16:49:30 2021 +0000

description:
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.

diffstat:

 sys/dev/usb/xhci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4a727bdc859b -r 2960d3c038e5 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sat May 29 13:08:08 2021 +0000
+++ b/sys/dev/usb/xhci.c        Sat May 29 16:49:30 2021 +0000
@@ -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);
                        }



Home | Main Index | Thread Index | Old Index