xhci: Prevent U1/U2 link pm states if exit latency is too long
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 5 Dec 2018 12:22:39 +0000 (14:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 12:00:10 +0000 (13:00 +0100)
commit0472bf06c6fd33c1a18aaead4c8f91e5a03d8d7b
tree429aa5236402a508f3144670dda76beec5dd189a
parenta7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d
xhci: Prevent U1/U2 link pm states if exit latency is too long

Don't allow USB3 U1 or U2 if the latency to wake up from the U-state
reaches the service interval for a periodic endpoint.

This is according to xhci 1.1 specification section 4.23.5.2 extra note:

"Software shall ensure that a device is prevented from entering a U-state
 where its worst case exit latency approaches the ESIT."

Allowing too long exit latencies for periodic endpoint confuses xHC
internal scheduling, and new devices may fail to enumerate with a
"Not enough bandwidth for new device state" error from the host.

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.c