]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:37:36 +0000 (12:37 +0200)
commitbf466c094481ea47a08e12bab45b83d5264e2ed8
treed7d554f6b01c1f0b91c8082b3a546c8d9cd48ab2
parentf378eb5ddf768677e443b125b6b360f1512ef6dc
xhci: fix 20000ms port resume timeout

BugLink: http://bugs.launchpad.net/bugs/1707233
commit a54408d0a004757789863d74e29c2297edae0b4d upstream.

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.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/host/xhci-hub.c