On Thu, 25 Jan 2007, Oliver Neukum wrote: > Am Donnerstag, 25. Januar 2007 18:20 schrieb Alan Stern: > > > This seems contradictory. If you want a generic blacklisting, you cannot > > > limit the information to autosuspending. > > > > It isn't contradictory. Autosuspend requests come exclusively from within > > usbcore, and we can easily prevent ourselves from making them. But > > general suspend commands come from outside (generally from the user), and > > we cannot prevent them from arriving. > > But are you sure you'll never want to autosuspend them? Even not > if they are eg. in config 0 or some other circumstances? You are > proposing to needlessly throw away the information which will be > hard to gather should it ever be needed again.
There's a limit to how much information you can put in a blacklist. NO_AUTOSUSPEND is okay, but AUTOSUSPEND_ONLY_IN_CONFIG_0 seems too extreme. How often will it happen that a device remains in config 0 (i.e., unconfigured)? Besides, if it ever turns out that we really do want to have AUTOSUSPEND_ONLY_IN_CONFIG_0, we can always add it. Remember, this doesn't have to be an absolutely perfect solution. We want the kernel to do the correct thing for the vast majority of devices, and for the odd exception we want the kernel to be conservative -- do no harm -- and allow userspace to take corrective action. Turning off autosuspend for a device is always safe, even though it may waste a little power. Now something we _could_ use is an API allowing userspace to do runtime suspend/resume of USB devices. The /sys/devices/.../power/state thing is deprecated and will be removed soon. I posted a patch for this purpose some time ago: http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115151191222054&w=2 Greg said that it wasn't needed yet. But eventually something like it _will_ be needed. 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