]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[xhci] Always reset root hub ports
authorMichael Brown <mcb30@ipxe.org>
Mon, 13 Apr 2015 13:08:09 +0000 (14:08 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 13 Apr 2015 13:37:15 +0000 (14:37 +0100)
In theory USB3 ports do not require a reset to enable the port.
Experimentation shows that this is sometimes required, particularly
when rerouting ports from EHCI to xHCI and switching speeds.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/usb/xhci.c

index b6ce7444131d1fbae3aab59fbea3055a0322658b..523a1c0b6acaa4f6e6255316e8ec7504d406d451 100644 (file)
@@ -2954,13 +2954,11 @@ static int xhci_root_enable ( struct usb_hub *hub, struct usb_port *port ) {
        uint32_t portsc;
        unsigned int i;
 
-       /* Reset port if applicable */
-       if ( port->protocol < USB_PROTO_3_0 ) {
-               portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port->address ) );
-               portsc &= XHCI_PORTSC_PRESERVE;
-               portsc |= XHCI_PORTSC_PR;
-               writel ( portsc, xhci->op + XHCI_OP_PORTSC ( port->address ) );
-       }
+       /* Reset port */
+       portsc = readl ( xhci->op + XHCI_OP_PORTSC ( port->address ) );
+       portsc &= XHCI_PORTSC_PRESERVE;
+       portsc |= XHCI_PORTSC_PR;
+       writel ( portsc, xhci->op + XHCI_OP_PORTSC ( port->address ) );
 
        /* Wait for port to become enabled */
        for ( i = 0 ; i < XHCI_PORT_RESET_MAX_WAIT_MS ; i++ ) {