david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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>
This commit is contained in:
Michael Brown 2015-02-11 11:18:35 +00:00
parent 1bb9e88ba0
commit 32d20fdd7e
2 changed files with 8 additions and 0 deletions

View File

@ -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 );

View File

@ -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