On Tue, 6 Mar 2007, Oliver Neukum wrote: > > As you say, remote wakeup is an orthogonal issue. So if remote wakeup is > > enabled when the user writes "suspend" to the attribute, the device will > > wakeup when an external event occurs. If not, it won't. > > OK, so we have two attributes "CanDoRemoteWakeup" and "WantRemoteWakeup" > The former is ro and comes from the descriptor, the latter is read/write. > !(CanDoRemoteWakeup && WantRemoteWakeup) -> no autosuspend
Actually we have a single attribute, named "wakeup". If the descriptor says that remote wakeup isn't available then the attribute file is empty and is ro. If the descriptor says remote wakeup is available then the attribute file is rw and contains either "enabled" or "disabled". That's how things have worked for several kernel releases. > > This makes me doubt that we should prevent the device from waking up when > > an internal I/O request occurs. If the user really wants to prevent the > > device from waking up, then he should prevent I/O requests. The means for > > doing this will depend on the individual device. > > Provided the user is capable of preventing that. I don't think we can > consider this self-evident. Perhaps. But think in terms of a power-management daemon. It should be smart enough to do the right thing, even if the user isn't. > > As another example, consider a USB network interface. Doing "ifconfig > > down" would prevent new requests from arriving. > > And it would kill existing sessions. Maybe that issue should be left to > the drivers. I would expect that suspending the network device and preventing it from resuming on demand (or on remote wakeup) would always kill existing sessions, no matter whether you do "ifconfig down" or not. All right, maybe it wouldn't if you did it for a short time -- but then what would be the point? Surely if you want to power down the network interface and leave it that way, you must realize that you can't keep live sessions bound to the interface. It is true that drivers will always have to ability to decide whether or not to autoresume when an I/O request arrives. Alan Stern ------------------------------------------------------------------------- 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 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel