Re: [PATCH] usb: core: raise root-hub autosuspend delay to stop a busy-loop

From: Michal Pecio

Date: Mon Nov 02 2026 - 08:59:59 EST


On Thu, 29 Oct 2026 22:23:02 -0400, Alan Stern wrote:
> On Wed, Oct 28, 2026 at 12:18:59PM +0800, Jianping Liu wrote:
> > From: Jianping Liu <frankjpliu@xxxxxxxxxxx>
> >
> > hub_probe() sets the hub autosuspend delay to 0. An idle hub is
> > therefore suspended at once, with no waiting time.
> >
> > Suspending the root hub can fail. While a port reports over-current
> > or a connect change, xHCI refuses the bus suspend and returns
> > -EBUSY. usb_runtime_suspend() returns that error. The hub is
> > resumed, and when its status URB completes the same suspend runs
> > again.

Yes, I have seen this ping-ponging before.

>
> Why should root hubs be special? An ordinary hub doesn't refuse to
> suspend because of an over-current or connect change. xhci-hcd ought
> to behave the same way.

IDK what happened there, but we have this:

commit e9fb08d617bfae5471d902112667d0eeb9dee3c4
Author: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
Date: Tue Apr 21 17:08:21 2020 +0300

xhci: prevent bus suspend if a roothub port detected a over-current condition

Suspending the bus and host controller while a port is in a over-current
condition may halt the host.
Also keep the roothub running if over-current is active.

Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20200421140822.28233-3-mathias.nyman@xxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

Regards,
Michal