Am Donnerstag, 15. Februar 2007 17:58 schrieb Alan Stern:
> On Thu, 15 Feb 2007, Oliver Neukum wrote:
>
> > Hi Alan,
> >
> > here are the changes I made to adapt the HID suspend code to the new
> > model. Basically I just changed the simple flag to a callback that allows
> > to know whether the flag has been checked and allow several independently
> > removable sources of business.
>
> I don't quite understand the point of changing the flag to a callback.
> Why do you need to have a callback? How do you end up using the
> additional flexibility? It seems to me the driver shouldn't know or care
> whether the flag has been checked.
The trouble with HID is that it does input and output. I choose to queue
output if the device is supended. I don't want to deal with the case of
having active output URBs when it's time to autosuspend.
Upping the count is not an option because I cannot sleep.
> I have been considering adding a different operating mode, where the
> autosuspend timer runs all the time while the device is awake. If the
> pm_usage_cnt is > 0 then the work routine restarts the timer and tries
> again later. That would be appropriate for devices where the autosuspend
> delay is relatively long (more than a few seconds) and where the device
> gets used quite heavily at times (like a mass storage device). You would
> end up with one timer callback every minute -- or whatever the delay is --
> instead of hundreds of mod_timer() calls every second. Would this help
> with what you are doing?
I am afraid not. But it seems to me that you would get higher efficiency.
If you don't go to the strict scheme. Don't restart the timer if the count
is elevated. Just don't kill the timer if the count gets elevated.
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel