Am Mittwoch, 22. September 2004 19:18 schrieb Alan Stern:
> 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.

If you want to suspend the whole system this is what you would likely
do anyway, as you potentially need to allocate a lot of ram or write
the system state to swap.
Plus, do we care? Isn't it a rare case? I smell premature optimisation.

[..]
> 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.

Only if you think strictly in terms of USB. Consider the case of a bluetooth
host on USB.

> 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

We should not require devices to know that, nor subsystems.

> 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.

This is only true for busses which don't implement power off commands
through the bus for devices with their own power supply.
True for USB, not good enough for a generic design.

        Regards
                Oliver


-------------------------------------------------------
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