lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0
On Thu, Dec 16, 2021 at 08:23:29AM +0800, Kai-Heng Feng wrote:
> On Wed, Dec 15, 2021 at 11:47 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> >
> > On Wed, Dec 15, 2021 at 08:01:06PM +0800, Kai-Heng Feng wrote:

> > > --- a/drivers/usb/core/hub.c
> > > +++ b/drivers/usb/core/hub.c
> > > @@ -1110,7 +1110,10 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> > > } else {
> > > hub_power_on(hub, true);
> > > }
> > > - }
> > > + /* Give some time on remote wakeup to let links to transit to U0 */
> > > + } else if (hub_is_superspeed(hub->hdev))
> > > + msleep(20);
> >
> > Where did the 20-ms number come from? Is it mentioned in the spec as
> > the time required for a port to switch from U3 to U0?
>
> The 20ms is the minimal time the device take to bring link back to U0 reliably.
> The spec mentioned device has to transit the link to U0 before
> signaling remote wakeup.
> So do you think this requires a new quirk?

No, I just wondered where you got the number from. The patch looks fine; I
can't think of any reasonable way to improve it.

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern

\
 
 \ /
  Last update: 2021-12-16 03:38    [W:0.519 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site