On Wed, 30 Jun 2004, David Brownell wrote:

> Alan Stern wrote:
> 
> >      Unfortunately the current API doesn't allow for such
> > distinctions; the suspend() method in usb_driver doesn't include an
> > argument to indicate which sort of suspend is about to occur.  Oddly
> 
> That's because there _is_ only one kind of "suspend"; the other
> is power-off!

Merely semantics.  If you want to suspend your computer by storing the 
state and turning everything off (suspend-to-disk), is that a suspend or a 
shutdown?  As far as the individual devices are concerned it's a shutdown.  
As far as the system, some of the drivers, and the user are concerned, 
it's a suspend.

> > enough, even PCI makes it difficult to tell since the two states are both
> > level-3 suspends (D3hot vs. D3cold).
> 
> And of course, USB != PCI/ACPI.
> 
> And as a rule, I've only seen PCI report "gonna D3hot suspend".
> But it sometimes says "whoops, this is a resume from D3cold";
> and that's for non-hotpluggable devices (not Cardbus etc).

I suppose it would be sufficient to have a single suspend() notifier, 
provided that the resume() notifier mentioned whether it was resuming from 
a power-on vs. power-off state.  It would mean the driver might have to 
preserve some extra state information unnecessarily during a power-on 
suspend -- "unnecessarily" because the device would retain the information 
-- but that shouldn't hurt.

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to