aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/usb/xhci.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/usb/xhci.c b/src/drivers/usb/xhci.c
index e9a7f4c..21c3e00 100644
--- a/src/drivers/usb/xhci.c
+++ b/src/drivers/usb/xhci.c
@@ -3051,6 +3051,19 @@ static int xhci_root_disable ( struct usb_hub *hub, struct usb_port *port ) {
portsc |= XHCI_PORTSC_PED;
writel ( portsc, xhci->op + XHCI_OP_PORTSC ( port->address ) );
+ /* Allow time for link state to stabilise */
+ mdelay ( XHCI_LINK_STATE_DELAY_MS );
+
+ /* Set link state to RxDetect for USB3 ports */
+ if ( port->protocol >= USB_PROTO_3_0 ) {
+ portsc &= XHCI_PORTSC_PRESERVE;
+ portsc |= ( XHCI_PORTSC_PLS_RXDETECT | XHCI_PORTSC_LWS );
+ writel ( portsc, xhci->op + XHCI_OP_PORTSC ( port->address ) );
+ }
+
+ /* Allow time for link state to stabilise */
+ mdelay ( XHCI_LINK_STATE_DELAY_MS );
+
return 0;
}