* [PATCH v2] usb: hub: use shorter 120ms post resume hold for SS root hubs
@ 2026-09-03 11:29 Lovekesh Solanki
2026-09-03 12:23 ` Mathias Nyman
0 siblings, 1 reply; 2+ messages in thread
From: Lovekesh Solanki @ 2026-09-03 11:29 UTC (permalink / raw)
To: linux-usb
Cc: linux-kernel, Mathias Nyman, Michal Pecio, Mathieu Fluhr,
Mario Limonciello, Thorsten Leemhuis, stable, greg, stern,
Lovekesh Solanki
Holding a USB3 hub PM runtime reference for 200ms at hub resume triggers
an AMD platform issue. Users running Android adb report crashes after
adb has been polling and waking up the USB subsystem once a second for
some time. Vendors are working on a solution. Disabling USB runtime PM
is one way to prevent this issue, but it is also proven that reducing the
hold time to 120ms in resume also mitigates it. See Link for more
details.
Reducing the hold time to 120ms for the USB3 roothub is in itself a valid
change and optimization, as the current 200ms is excessive: a root hub
has no upstream suspended hub whose wake propagation needs to be
accounted for, but still need some time for USB3 link training to
complete.
Keep the 200ms hold for external hubs that commit 8f5b7e2bec1c
("usb: hub: fix detection of high tier USB3 devices behind suspended
hubs") is intended for.
Reported-by: Mathieu Fluhr <mathieu.fluhr@gmail.com>
Link: https://lore.kernel.org/all/CAPyJwA_D9qw0T72f8zwM1yKjP+To=maVANbcdsWM7yRmbBxYvw@mail.gmail.com/
Cc: stable@vger.kernel.org
Fixes: 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs")
Signed-off-by: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
---
Changes in v2:
- Reword commit message per Mathias review
- Place root hub timeout define next to existing
timeout define, and edit the existing comment per Mathias suggestion
drivers/usb/core/hub.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3345b3298daf..b446905b48be 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -73,8 +73,11 @@
/*
* Give SS hubs 200ms time after wake to train downstream links before
* assuming no port activity and allowing hub to runtime suspend back.
+ * Root hubs have no upstream hub whose wake propagation needs to be
+ * accounted for, so they need less time, use 120ms for them.
*/
#define USB_SS_PORT_U0_WAKE_TIME 200 /* ms */
+#define USB_SS_RH_PORT_U0_WAKE_TIME 120 /* ms */
/* Protect struct usb_device->state and ->children members
* Note: Both are also protected by ->dev.sem, except that ->state can
@@ -1358,7 +1361,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
queue_delayed_work(system_power_efficient_wq,
&hub->post_resume_work,
- msecs_to_jiffies(USB_SS_PORT_U0_WAKE_TIME));
+ msecs_to_jiffies(hdev->parent ?
+ USB_SS_PORT_U0_WAKE_TIME :
+ USB_SS_RH_PORT_U0_WAKE_TIME));
return;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] usb: hub: use shorter 120ms post resume hold for SS root hubs
2026-09-03 11:29 [PATCH v2] usb: hub: use shorter 120ms post resume hold for SS root hubs Lovekesh Solanki
@ 2026-09-03 12:23 ` Mathias Nyman
0 siblings, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2026-09-03 12:23 UTC (permalink / raw)
To: Lovekesh Solanki, linux-usb
Cc: linux-kernel, Michal Pecio, Mathieu Fluhr, Mario Limonciello,
Thorsten Leemhuis, stable, greg, stern
On 9/3/26 14:29, Lovekesh Solanki wrote:
> Holding a USB3 hub PM runtime reference for 200ms at hub resume triggers
> an AMD platform issue. Users running Android adb report crashes after
> adb has been polling and waking up the USB subsystem once a second for
> some time. Vendors are working on a solution. Disabling USB runtime PM
> is one way to prevent this issue, but it is also proven that reducing the
> hold time to 120ms in resume also mitigates it. See Link for more
> details.
>
> Reducing the hold time to 120ms for the USB3 roothub is in itself a valid
> change and optimization, as the current 200ms is excessive: a root hub
> has no upstream suspended hub whose wake propagation needs to be
> accounted for, but still need some time for USB3 link training to
> complete.
>
> Keep the 200ms hold for external hubs that commit 8f5b7e2bec1c
> ("usb: hub: fix detection of high tier USB3 devices behind suspended
> hubs") is intended for.
>
> Reported-by: Mathieu Fluhr <mathieu.fluhr@gmail.com>
> Link: https://lore.kernel.org/all/CAPyJwA_D9qw0T72f8zwM1yKjP+To=maVANbcdsWM7yRmbBxYvw@mail.gmail.com/
> Cc: stable@vger.kernel.org
> Fixes: 8f5b7e2bec1c ("usb: hub: fix detection of high tier USB3 devices behind suspended hubs")
> Signed-off-by: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-03 12:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 11:29 [PATCH v2] usb: hub: use shorter 120ms post resume hold for SS root hubs Lovekesh Solanki
2026-09-03 12:23 ` Mathias Nyman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox