Oliver Neukum wrote: > Am Montag 05 Mai 2008 14:45:45 schrieb Alan Jenkins: > >> Oliver Neukum wrote: >> >>> Am Montag 05 Mai 2008 11:51:03 schrieb Alan Jenkins: >>> > > >>>> drivers isn't considered to require power, then it shouldn't be >>>> considered to be active? Or is this an illogical quirk of the UHCI >>>> hardware? >>>> >>> In a way. UHCI needs to do DMA. But many devices crash when suspended. >>> So the kernel refrains from doing so unless told otherwise. >>> >> OK. So there could be bad side effects (buggy fingerprint reader starts >> flashing a backlight annoyingly, or kills the bus, or something). Also >> > > Yes. > > >> if you had a driver but needed to bind it manually / start it in >> userspace, then the kernel would have crashed the device before you >> > > Yes. > > >> could do anything with it. I had only thought about autosuspend >> breaking devices while you were using them. >> >> >>>> Are you suggesting that Sascha and others need to identify all the >>>> devices without drivers hanging off their USB bus and de-"activate" them >>>> in sysfs, i.e. >>>> >>>> echo "suspend" > power/level >>>> >>> I am suggesting that. Or rather that they use "auto" instead of >>> "suspend" >>> >> But if you use "auto", then you have to wait for the timeout (as set in >> > > Yes. 2 seconds by default. > > >> the autosuspend file), and the driver has to support it to some extent, >> > > Yes. If you have no real kernel driver, usbfs can be considered the driver > for this purpose. It supports autosuspend. > > >> right? If you can't use the device anyway because there's no driver, >> I'd have thought it's simpler to try forcing it to suspend, rather than >> fiddling with autosuspend. >> > > "suspend" is for desperate cases. It can do bad things if you use the > device. If you break the kernel, you keep the pieces. > Thanks for the warning! That's not mentioned in the otherwise comprehensive <Documentation/usb/power-management.txt>. >> I mentioned earlier that I couldn't get my USB keyboard to autosuspend, >> but I could suspend it manually (on 2.6.24.4). I assume the usb_hid >> driver doesn't support autosuspend. So you're saying autosuspend will >> > > In 2.6.24 it has some extremely rudimentary support that won't work for > keyboards. > > >> work when there's no driver to veto it (assuming the hardware doesn't >> crash)? >> > > While the device is not in use, yes. A device like a fingerprint reader > will be woken up if user space uses it and suspended again after the > timeout after closure. > > I've written better support for autosuspend. It's not fully finished and I've > got reports about deadlocks with keyboards. Do you want to test? > > Regards > Oliver Yes, I'd love to test that. Let me know if I should build with lockdep, or any other particular debugging option.
Alan _______________________________________________ Discuss mailing list [email protected] http://mail.lesswatts.org/mailman/listinfo/discuss
