]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xhci: fix 20000ms port resume timeout
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 20 Jul 2017 11:48:29 +0000 (14:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jul 2017 12:40:36 +0000 (14:40 +0200)
commita54408d0a004757789863d74e29c2297edae0b4d
tree66173ead002352eb4ec98032ef623e31f8a62793
parent28a2369f7d72ece55089f33e7d7b9c1223673cc3
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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c