xhci: Prevent device initiated U1/U2 link pm if exit latency is too long
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 4 Oct 2019 11:59:27 +0000 (14:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2019 20:43:23 +0000 (13:43 -0700)
commit81413e70cc464d83fd27dce4ac2bbfadcbd1435d
treef0e75172d492f69330413d25b29225aa3bb4d74b
parent83f8e29a68e8dc0d64c67df2663b59fd19e47148
xhci: Prevent device initiated U1/U2 link pm if exit latency is too long

commit cd9d9491e835a845c1a98b8471f88d26285e0bb9 upstream.

If host/hub initiated link pm is prevented by a driver flag we still must
ensure that periodic endpoints have longer service intervals than link pm
exit latency before allowing device initiated link pm.

Fix this by continue walking and checking endpoint service interval if
xhci_get_timeout_no_hub_lpm() returns anything else than USB3_LPM_DISABLED

While at it fix the split line error message

Tested-by: Jan Schmidt <jan@centricular.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/1570190373-30684-3-git-send-email-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c