Re: [RFC PATCH] usb: core: defer leaf-device resume off the S3 critical path
From: Marco Crivellari
Date: Wed Aug 05 2026 - 06:24:40 EST
Hello,
On Wed, Aug 5, 2026 at 11:37 AM Hongyu Xie <xiehongyu1@xxxxxxxxxx> wrote:
> [...]
> @@ -1643,11 +1754,22 @@ int usb_resume_complete(struct device *dev)
> {
> struct usb_device *udev = to_usb_device(dev);
>
> + if (udev->state == USB_STATE_NOTATTACHED)
> + return 0;
> +
> + /* Queue the real port reset after dpm_complete, once every hub in
> + * the tree has finished resume and downstream ports are settled.
> + */
> + if (udev->defer_resume_pending) {
> + udev->defer_resume_pending = 0;
> + queue_work(system_unbound_wq, &udev->defer_resume_work);
> + return 0;
> + }
> +
Please note that `system_unbound_wq` is the old unbound Workqueue. You
should use the newer, `system_dfl_wq`.
Thanks!
--
Marco Crivellari
SUSE Labs