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, 24 Jan 2023 06:24:34 +0000 (07:24 +0100)
commit8c36de0935466ba17d5f0d57ed29f4b8c4d6cc9d
tree8311948688b2b68b7dd885cb4bfeb04472b71362
parent60c1eb013e1eff6200e1beb462cdcc3a14d9a77f
xhci: Add a flag to disable USB3 lpm on a xhci root port level.

commit 0522b9a1653048440da5f21747f21e498b9220d1 upstream.

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