On Mon, 19 Feb 2007, Oliver Neukum wrote: > Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > > There are two main disadvantages to the less-strict scheme. One is that > > the timing of autosuspends isn't as precise: If the timer goes off every > > 10 seconds, then a suspend could occur anywhere between 10 and 20 seconds > > after the device becomes idle. IMO this doesn't matter very much. > > I've looked at this again. It seems to me that if usb_autoresume_device() > doesn't kill the timer, usb_probe_interface() will race with autosuspend. > Specifically, you might autosuspend an interface without calling its driver's > suspend() method, if the timer expires on another CPU.
No, that can't happen. usb_autoresume_device() always increments udev->pm_usage_cnt. autosuspend_check() returns early if that count is positive, preventing any autosuspend no matter what state the interface is in. In fact, usb_autoresume_device() _should_ always stop the timer. The proposal is that usb_autopm_get_interface() might leave the timer running. 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 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
