Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xhci: Return if xHCI doesn't support LPM

Just return if xHCI is quirked to disable LPM. We can save some time
from reading registers and doing spinlocks.

Add stable tag as we want this patch together with the next one,
"Poll for U0 after disabling USB2 LPM" which fixes a suspend issue
for some USB2 LPM devices

Cc: stable@vger.kernel.org
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200624135949.22611-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kai-Heng Feng and committed by
Greg Kroah-Hartman
f0c472a6 a24d5072

+4 -1
+4 -1
drivers/usb/host/xhci.c
··· 4391 4391 int hird, exit_latency; 4392 4392 int ret; 4393 4393 4394 + if (xhci->quirks & XHCI_HW_LPM_DISABLE) 4395 + return -EPERM; 4396 + 4394 4397 if (hcd->speed >= HCD_USB3 || !xhci->hw_lpm_support || 4395 4398 !udev->lpm_capable) 4396 4399 return -EPERM; ··· 4416 4413 xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n", 4417 4414 enable ? "enable" : "disable", port_num + 1); 4418 4415 4419 - if (enable && !(xhci->quirks & XHCI_HW_LPM_DISABLE)) { 4416 + if (enable) { 4420 4417 /* Host supports BESL timeout instead of HIRD */ 4421 4418 if (udev->usb2_hw_lpm_besl_capable) { 4422 4419 /* if device doesn't have a preferred BESL value use a