On Wednesday 27 April 2005 2:32 pm, Alan Stern wrote:
> 
> That's not in question.  The issue is: Out of all the drivers floating 
> around, which one should decide when a particular device can be suspended 
> for lack of activity?

Erm, not just _one_ can do it.  Certainly any interface's driver can know
that it's now idle; for example, if a network interface is down, that
particular interface can be suspended (then resumed later as needed).

But usbcore has two obvious places to put such logic.  Basically, the
two modes of "usb_device" ... one for normal devices (with one or
more interfaces, bound to drivers), and the other for hubs (managing
ports or child devices, however you look at it).


> > And in general, every USB device could autosuspend like that:  once all its
> > children/interfaces are suspended, call usb_suspend_device().
> 
> That scheme (or one like it) can work for lots more devices than just USB!

That's part of why I've been talking about Linux needing a "container based"
scheme for suspending.  That model works for various bridges and adapters,
as well as more complex amalgamations of hardware.  Parent/child is clearly
one type of container; there can be others.  A key point is the need for
parents to be notified, so that when they have to do something, they can.


> I do have an old patch somewhere for adding hub autosuspend.  It never
> went very far, partly because of the ongoing changes in the PM core and
> partly because OHCI didn't like it.  And UHCI's root hub support wasn't in
> good enough shape at the time to allow autosuspend, although now it should
> be okay.  The patch did work when suspending external hubs attached to a
> UHCI controller.

I remember that.  It's the right direction, but the patch was just
a bit early ... :)

- Dave



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to