On Tue, 15 May 2007, Oliver Neukum wrote:

> Hi,
> 
> this is autosuspend for HID devices. It uses the new last_busy facility
> for USB devices. And for a few functions the pm counter.
> 
> The main problem implementing this is LEDs. HID has the very though
> property of initiating output to them without user space's involvement
> from interrupt context to all attached devices. Doing this with suspended
> devices is problematic.
> Output requests now go through different code paths depending on whether
> the device they are intended for is asleep or not. In the suspended case
> they are merely queued and the queue processed on resume.
> 
> Upon every input recieved, whether faulty or not, the device is marked
> busy. The race with output requests is handled with a spinlock. The
> suspend handler will report a failure if autosuspend wins the race against
> output, thus solving the problem.

Can you break this up into two patches?  If the first adds the queuing 
code and the second adds autosuspend support, it will be much easier to 
appraise and test them.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to