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. Furthermore that work should be queued only if pm_usage_cnt==0, which cannot be allowed if the device isn't idle. > 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. > P.S.: Nowadays we're supposed to use DEFINE_SPINLOCK(). Modernist ;-) Regards Oliver ------------------------------------------------------------------------- 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