diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2017-11-09 10:03:46 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2017-11-09 10:03:46 +0000 |
| commit | d70eb4e33fbf061bc0061a3f7b28f781963f01b8 (patch) | |
| tree | f65312def8f16655674da0654d73b2e593b1ebf7 /sys/dev/usb | |
| parent | 326fb3fd94247507e5467cfcd7845f816d7c2253 (diff) | |
Wait 1ms first. Existing Intel xHCI requies 1ms delay to prevent system hang
(Errata).
XXX pullup-[78]
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/xhci.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 9963eca5501..7d0899df6b9 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.75 2017/10/28 00:37:13 pgoyette Exp $ */ +/* $NetBSD: xhci.c,v 1.76 2017/11/09 10:03:46 msaitoh Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.75 2017/10/28 00:37:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.76 2017/11/09 10:03:46 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -689,10 +689,14 @@ xhci_hc_reset(struct xhci_softc * const sc) 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"); |
