Am Montag, 26. Februar 2007 18:37 schrieb Alan Stern:
> > a) The kernel will (or rather should) export its oppinion whether a device
> > should be suspended (eg. from the blacklist or set by a driver)
>
> Be careful in your choice of words. Do you mean "suspended" or
> "autosuspended"? The kernel basically has no choice about whether a
> device should be allowed to suspend. It _must_ be allowed; otherwise
> swsusp won't work.
Yes, sorry autosuspend.
> The kernel's opinion about whether a device should be autosuspended _is_
> exported through the power/autosuspend attribute. Values > 0 mean yes (or
> >= 0 after I change it), other values mean no.
That seems almost deliberately obfuscated.
One file, one value, one meaning.
(sounds vaguely like a song by Queen)
> > b) The security implications are different
>
> In what way? Why are you so concerned about security implications?
> Almost all of the writable files in sysfs are writable only by the
> superuser; this doesn't have to be any different.
Setting a delay shouldn't be limited to root.
> > > I don't understand your point. Preventing a device from autosuspending
> > > isn't a denial-of-service, although it might be a denial-of-power-savings.
> >
> > _Allowing_ it is, as we have buggy devices which crash.
>
> Yes. That's what PAM is for, right?
Operating on files.
> > > > Thus a sequence of
> > > > a) read old delay
> > > > b) request 0 delay
> > > > c) restore old delay
> > > >
> > > > should suspend the device if it is not doing IO.
> > >
> > > Yes, except that both you and Greg have requested that step c) should
> > > wake up the device and restart the timer using the reinstated old delay.
> > > Of course, if you stop after step b) the effect will be to suspend the
> > > device as soon as it is no longer in use.
> >
> > I am complicated. I have conditional wishes.
> > I want step (c) to wake up the device only if on/off is included in that
> > value.
> > I can't speak for Greg, though.
>
> Now you're asking to have two values included in a single sysfs write
> (on/off and delay). That's a no-no. :-)
Two files, two values, one in each.
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