On Mon, 19 Feb 2007, Oliver Neukum wrote: > Hi, > > looking a bit more at the API of the new autosuspend code there seems to be > a function missing. We now have three states: > > count > 0 <-> count == 0 and timer running <-> suspended > > The only way to return to the middle state is through the first state. > If we are to always autoresume on demand, it seems to me that > the API should be symmetric in that regard. What do you think?
You're right. If the count is 0 but the DEVICE_BUSY flag is set then we should resume and start the timer. There's another problem you haven't noticed. Let's say a single device has two interfaces, one with a 20-second autosuspend delay and the other with a 3-second delay. When the device sends a remote-wakeup request we will have to wait the full 20 seconds before it can autosuspend again, even if only the second interface is in use. The only way to fix this is to store a jiffies value (time of last use) in the interface structure along with (or perhaps instead of) the DEVICE_BUSY flag. My feeling is that this would be extra complication we don't really need. What's your impression? 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
