On Fri, 23 Feb 2007, Greg KH wrote: > > The gist of it runs like this: The autosuspend attribute file controls > > when & whether autosuspend events will occur. If you set it to 0 then > > there will be no more autosuspend events. Devices that are awake will > > remain awake and devices that are asleep will remain asleep. Or to put it > > another way, lack of any more autosuspend events != presence of an > > autoresume event. > > Sure, but as the default is 2 seconds, it's hard to change that by hand.
Ah, but the default is now a module parameter, so you can set it in advance to something larger than 2 seconds! :-) > And, if you realize that the device was disabled, you can't turn it back > on after the fact. > > > Besides, people already do have several ways of turning power back on to a > > device. If you are the superuser you can do > > > > echo -n 0 >/sys/bus/usb/devices/.../power/state > > yeah, that file isn't even in my builds anymore :( Part of the development I did with Oliver was to add a .../power/suspended attribute for USB devices. Writing 1 would immediately suspend the device and writing 0 would immediately resume it. Should I submit that part as a separate new patch? > > (although this is deprecated and will vanish in July -- we may want to add > > a new attribute file just for USB devices so that people won't lose the > > ability to do selective suspends and resumes). Even if you are just a > > normal user, opening a device's usbfs file will resume that device. And > > running any program based on libusb -- such as lsusb -- will wake up all > > suspended USB devices. > > Oh, that's a fun hack, yeah, that worked... But try to document that > one in a simple way. > > I still think that once we write to the autosuspend file, the timer > should start over, with power enabled. If this means turning it back > on, we should. Otherwise, it's very confusing. Okay, I'll change it. Stay tuned... 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