On Wed, 31 Jan 2007, Oliver Neukum wrote: > Am Mittwoch, 31. Januar 2007 17:11 schrieb Alan Stern: > > > This looks more complicated than it should be. In particular, the > > addition of a new "idle" timer should not be needed. > > > > We already have an autosuspend timer: the one embedded in the autosuspend > > delayed_work struct inside struct usb_device. What you really want to do > > is make the delay configurable per-device instead of relying on a fixed > > constant USB_AUTOSUSPEND_DELAY. Doing things that way would remove a > > tremendous amount of complexity from your patch. > > It would also introduce a layering violation.
You mean that you want an interface-specific timer rather than device-specific. Won't that add up to an awful lot of timers, especially when other drivers start doing the same thing? I think it's better to reduce complexity. Find a way to live with the existing single driver-wide timer that allows interface drivers to alter the setting in a layering-friendly manner. > Furthermore that work should be queued only if pm_usage_cnt==0, > which cannot be allowed if the device isn't idle. Isn't that what you want? Surely you aren't trying to start an autosuspend timer while the device is busy? > > If the user could put usbcore.autosuspend_delay=60 on the boot command > > line, then it would be possible to prevent some devices from being > > autosuspended. > > Just startup with autosuspend off. There _is_ no way to turn it off, other than not setting CONFIG_USB_SUSPEND -- in which case there's no way to turn it on. 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