Re: parallel suspend/resume

Alan Stern
2007-12-08T22:00:04Z

On Sat, 8 Dec 2007, Alan Stern wrote:

> On Fri, 7 Dec 2007, David Brownell wrote:
>
> > FWIW the appended patch removes that rude "order of registration"
> > policy, so that the suspend/resume list matches the device tree.
> > It's behaved OK on PCs and, in light duty, a few development boards;
> > I've carried it around most of this year.
>
> Actually I'm surprised that it works with USB devices.
>
> As they are registered, you patch adds new devices to the list
> immediately after their parents. This means that the children of a
> particular device will be listed in reverse order of registration,
> right?
>
> So if you have a USB hub, the hub's children will be added following
> the hub, and the hub's interface will come after all the children since
> it gets registered before them. Hence during suspend, the interface's
> suspend method will be called before any of the children are suspended.
> But hub_suspend() will fail if there are unsuspended children.

I take it back. Interfaces get suspended along with their device;
hence it doesn't matter in what order the interface is listed with
respect to the children.

Alan Stern