aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorMathias Nyman <[email protected]>2025-03-14 14:19:58 +0000
committerGreg Kroah-Hartman <[email protected]>2025-04-11 14:08:34 +0000
commitbf6e36a033140da67238bce15e1199e37065810d (patch)
treee0ef6b319db52ee022e4ce0bcb8c3bef51799b38 /drivers/usb/core/hub.c
parentusb: hub: verify device is configured in usb_device_may_initiate_lpm() (diff)
downloadkernel-bf6e36a033140da67238bce15e1199e37065810d.tar.gz
kernel-bf6e36a033140da67238bce15e1199e37065810d.zip
usb: hub: Don't disable LPM completely if device initiated LPM fails
Enabling device initiated USB3 link power management (LPM) may fail for various reasons such as too long system exit latency, or link issues. These are not good reason to disable hub initiated LPM U1/U2 states, especially as it requires sending more requests over a possibly broken link, causing the hub work to block for even longer. Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 9b5ef4147891..1b89786ecb54 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4345,17 +4345,8 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev,
* Enable device initiated U1/U2 with a SetFeature(U1/U2_ENABLE) request
* if system exit latency is short enough and device is configured
*/
- if (usb_device_may_initiate_lpm(udev, state)) {
- if (usb_set_device_initiated_lpm(udev, state, true)) {
- /*
- * Request to enable device initiated U1/U2 failed,
- * better to turn off lpm in this case.
- */
- usb_set_lpm_timeout(udev, state, 0);
- hcd->driver->disable_usb3_lpm_timeout(hcd, udev, state);
- return;
- }
- }
+ if (usb_device_may_initiate_lpm(udev, state))
+ usb_set_device_initiated_lpm(udev, state, true);
if (state == USB3_LPM_U1)
udev->usb3_lpm_u1_enabled = 1;