]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: prevent U2 link power state if Intel tier policy prevented U1
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 11 May 2022 22:04:48 +0000 (01:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 16:32:25 +0000 (18:32 +0200)
commit12e2b76cca4fbb5279ef3ef007efeb45aa14d1dc
treec460a1e293d7b2e581e2e85b6f6af7f747a8bbea
parentadbcbf589ae8d42970cf1a07b8a1753a2000ebf1
xhci: prevent U2 link power state if Intel tier policy prevented U1

Don't enable U1 or U2 Link powermanagenet (LPM) states for USB3
devices connected to tier 2 or further hubs.

For unknown reasons we previously only prevented U1.
Be consistent, and prevent both U1/U2 states if tier policy doesn't
allow LPM.

Also check the tier policy a bit earlier, and return if U1/U2 is
not allowed. This avoids unnecessary xhci MEL commands.

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