Re: [PATCH 4/4] USB: export autosuspend delay in sysfs

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Am Freitag, 2. März 2007 17:27 schrieb Alan Stern:
> On Thu, 1 Mar 2007, Oliver Neukum wrote:
> 
> > Down an interface and it stays down. Suspend an interface and it ...
> 
> ... and it stays suspended until the kernel tries to send a packet out
> through that interface or until a packet is received (assuming proper
> hardware wakeup support is available and enabled).  That's pretty much
> exactly how I'd want my interface to behave if I was trying to save power.

That is how I expect autoconfig to work. If I suspend a device manually I
expect to to stay suspended until it say otherwise.

> > > Take a look at the definition of pm_message_t and tell me where you think
> > > the information could be stored.
> > 
> > How many in kernel data structures have been changed?
> 
> How many times have you succeeded in getting Pavel to change any of his 
> data structures?  :-)

I'll try voodoo. Or maybe I promise him a quadruped.

> > Though if we limit
> > pm to autosuspend the point is moot.
> 
> This boils down to one of our unanswered questions: How can we allow the
> user to suspend a device if the driver wants remote-wakeup capability but

Export the conditionality in sysfs? "NeedsRemoteWakeup" ?

> remote wakeup is disabled?  Autosuspend won't do it, for a simple reason:  
> Autosuspend is always supposed to be safe, and without remote wakeup
> it might not be safe.  We will need something stronger.
> 
> The other unanswered question is whether we need a separate attribute 
> (with separate permissions) for enabling/disabling autosuspend.  Note 
> that this attribute would be per-device and not per-interface, even if we 
> do have a per-interface delay attribute.

Yes, we need that.

> It would be nice if we could solve both questions together.  For example, 
> we might have a device attribute that would allow the superuser to:
> 
> 	Turn off autosuspend completely;
> 
> 	Allow autosuspend to operate normally, using the delay value
> 	specified in the other attribute file;
> 
> 	Force an immediate suspend, even if remote wakeup is disabled.

Have a delay attribute per interface and give each device an attribute
"SuspensionState" with the permissible values "on", "auto" & "suspend"
Handle RemoteWakeup as an orthogonal issue.

	Regards
		Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.