Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/usb Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/ce3981670c79
branches:  netbsd-8
changeset: 434393:ce3981670c79
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Nov 17 20:35:57 2017 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #356):
        sys/dev/usb/xhci.c: revision 1.76
Wait 1ms first. Existing Intel xHCI requies 1ms delay to prevent system hang
(Errata).

diffstat:

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

diffs (34 lines):

diff -r 440ffa85a138 -r ce3981670c79 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Fri Nov 17 20:33:53 2017 +0000
+++ b/sys/dev/usb/xhci.c        Fri Nov 17 20:35:57 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.72.2.2 2017/11/02 21:29:52 snj Exp $        */
+/*     $NetBSD: xhci.c,v 1.72.2.3 2017/11/17 20:35:57 snj Exp $        */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.2 2017/11/02 21:29:52 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72.2.3 2017/11/17 20:35:57 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -689,10 +689,14 @@
        usbcmd = XHCI_CMD_HCRST;
        xhci_op_write_4(sc, XHCI_USBCMD, usbcmd);
        for (i = 0; i < XHCI_WAIT_HCRST; i++) {
+               /*
+                * Wait 1ms first. Existing Intel xHCI requies 1ms delay to
+                * prevent system hang (Errata).
+                */
+               usb_delay_ms(&sc->sc_bus, 1);
                usbcmd = xhci_op_read_4(sc, XHCI_USBCMD);
                if ((usbcmd & XHCI_CMD_HCRST) == 0)
                        break;
-               usb_delay_ms(&sc->sc_bus, 1);
        }
        if (i >= XHCI_WAIT_HCRST) {
                aprint_error_dev(sc->sc_dev, "host controller reset timeout\n");



Home | Main Index | Thread Index | Old Index