On Wed, 22 Sep 2004, Oliver Neukum wrote:

> Am Mittwoch, 22. September 2004 17:15 schrieb Alan Stern:
> > This leaves some unanswered questions. �On some buses (such as PCI or
> > USB), it's not possible to access a device whenever its state is higher
> > than 0. �So how can a driver increase the state, once it is positive? �
> > Conceivably this could cause a system-wide state-3 suspend to fail if some
> > device were already say in state 1.
> 
> Worse, it applies to any device higher up in the tree.
> The transition rule that you can enter a state >0 only from 0
> and only 0 from a state >0 is IMHO needed.

The problem with your rule is that when you want to suspend the entire 
system, and some devices are already suspended, it means you have to wake 
them up again just to put them back to sleep!  There's got to be a 
shortcut.

Part of the problem may be that the meaning of suspend() isn't clearly
defined.  Does it mean the driver is supposed to reduce the device's power
usage, or does it mean that the available power is going to be reduced by
someone else so the driver should simply prepare the device?  When the
latter is true there's nothing much to worry about.  Likewise, if the
device has only one reduced-power mode (as with USB) there's no problem.  
In cases like these, waking up in order to go back to sleep seems silly.

On the other hand, suppose we go ahead and implement a power-off state in 
usbcore (by turning off the power to the device's parent port).  If a hub 
and its child device are both in USB suspend, then there's no way to 
power-off the child without waking the hub.  If the power-off request was 
for that single device alone we can simply return an error.  If the 
power-off request was system-wide then the error won't matter; when the 
power to the parent hub is turned off, the power to the child will be too.

So I'm not sure what the right approach is.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to