xhci: Add a flag to disable USB3 lpm on a xhci root port level.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 16 Jan 2023 14:22:14 +0000 (16:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 15:37:24 +0000 (16:37 +0100)
commit0522b9a1653048440da5f21747f21e498b9220d1
tree98cd4422e71f44e59c81650866a99605d90ad06d
parent23a3b8d5a2365653fd9bc5a9454d1e7f4facbf85
xhci: Add a flag to disable USB3 lpm on a xhci root port level.

One USB3 roothub port may support link power management, while another
root port on the same xHC can't due to different retimers used for
the ports.

This is the case with Intel Alder Lake, and possible future platforms
where retimers used for USB4 ports cause too long exit latecy to
enable native USB3 lpm U1 and U2 states.

Add a flag in the xhci port structure to indicate if the port is
lpm_incapable, and check it while calculating exit latency.

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