diff options
author | Michael Brown | 2015-02-11 12:18:35 +0100 |
---|---|---|
committer | Michael Brown | 2015-02-11 12:18:35 +0100 |
commit | 32d20fdd7e09ba878f9409f8604e14d411c83abc (patch) | |
tree | b0b575402dd68198029e6c1b0a903bd6db4103ce /src | |
parent | [ecm] Add support for CDC-ECM USB Ethernet devices (diff) | |
download | ipxe-32d20fdd7e09ba878f9409f8604e14d411c83abc.tar.gz ipxe-32d20fdd7e09ba878f9409f8604e14d411c83abc.tar.xz ipxe-32d20fdd7e09ba878f9409f8604e14d411c83abc.zip |
[xhci] Delay after (possibly) forcing port link state to RxDetect
Some xHCI controllers (observed with a Renesas Electronics PCIe USB3
card) seem to require a delay after forcing the link state of USB3
ports to RxDetect. Omitting this delay causes strange behaviour
including system lockups.
Add an unconditional 20ms delay after writing the port link states.
This seems to be sufficient to avoid the problem.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/usb/xhci.c | 5 | ||||
-rw-r--r-- | src/drivers/usb/xhci.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/usb/xhci.c b/src/drivers/usb/xhci.c index bf8cf1c8..396d943d 100644 --- a/src/drivers/usb/xhci.c +++ b/src/drivers/usb/xhci.c @@ -2774,6 +2774,11 @@ static int xhci_hub_open ( struct usb_hub *hub ) { } } + /* Some xHCI cards seem to require an additional delay after + * setting the link state to RxDetect. + */ + mdelay ( XHCI_LINK_STATE_DELAY_MS ); + /* Record hub driver private data */ usb_hub_set_drvdata ( hub, xhci ); diff --git a/src/drivers/usb/xhci.h b/src/drivers/usb/xhci.h index 186ff27d..ec951bd6 100644 --- a/src/drivers/usb/xhci.h +++ b/src/drivers/usb/xhci.h @@ -236,6 +236,9 @@ enum xhci_default_psi_value { /** Port link state write strobe */ #define XHCI_PORTSC_LWS 0x00010000UL +/** Time to delay after writing the port link state */ +#define XHCI_LINK_STATE_DELAY_MS 20 + /** Connect status change */ #define XHCI_PORTSC_CSC 0x00020000UL |