xhci: optimize xhci bus resume time
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 29 May 2015 14:01:51 +0000 (17:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 06:45:31 +0000 (15:45 +0900)
commit41485a90d573764738a2d096c01133fe30c2ebca
tree03b0296732b60c94f83991f44c173c5315d5989c
parent9fa733f24bb54dd532b5f5d7abc275c4a547c69f
xhci: optimize xhci bus resume time

We used to write the root port state changes in turn for every port,
sleeping 20ms after every port state change. Suspended usb2 ports need
two state changes, taking minimun 40ms per port.

Now instead poll the Port Link State Change (PLC) bit as
the state change to U0 will set this bit.
Suspended usb2 ports still need the extra 20ms delay, but we now change
all the port states at once so we only need to sleep 20ms once all together

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