patch "xhci: fix 20000ms port resume timeout" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
xhci: fix 20000ms port resume timeout
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
a54408d0a004757789863d74e29c2297edae0b4dMon Sep 17 00:00:00 2001
From: Mathias Nyman <[email protected]>
Date: Thu, 20 Jul 2017 14:48:29 +0300
Subject: xhci: fix 20000ms port resume timeout
A uncleared PLC (port link change) bit will prevent furuther port event interrupts for that port. Leaving it uncleared caused get_port_status() to timeout after 20000ms while waiting to get the final port event interrupt for resume -> U0 state change.
This is a targeted fix for a specific case where we get a port resume event racing with xhci resume. The port event interrupt handler notices xHC is not yet running and bails out early, leaving PLC uncleared.
The whole xhci port resuming needs more attention, but while working on it it anyways makes sense to always ensure PLC is cleared in get_port_status before setting a new link state and waiting for its completion.
--- drivers/usb/host/xhci-hub.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/host/xhci-hub.c +3 -0
@@ -904,6 +904,9 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,clear_bit (wIndex, &bus_state->resuming_ports);set_bit (wIndex, &bus_state->rexit_ports); + +xhci_test_and_clear_bit (xhci, port_array, wIndex, +PORT_PLC );xhci_set_link_state (xhci, port_array, wIndex,XDEV_U0 );
Signature · 1 line
2.13.3