david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[xhci] Always reset root hub ports

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>
This commit is contained in:
Michael Brown 2015-04-13 14:08:09 +01:00
parent 68d8a44469
commit 867e3ee475
1 changed files with 5 additions and 7 deletions

View 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++ ) {