Re: autosuspend for HID devices, take #2

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Dienstag, 22. Mai 2007 18:50 schrieb Jiri Kosina:
> On Tue, 22 May 2007, Alan Stern wrote:
> 
> > But if you kill the interrupt URB then there will be no more inputs and 
> > hence nothing to generate any more output.  Thus, when suspending you 
> > should kill the inputs and wait for the outputs to drain (or else 
> > explicitly plug the output queue).  Then it will be safe to autoresume 
> > whenever a new output queue entry arrives.
> 
> Hi Alan,
> 
> I think that this is unfortunately not true. Let's take system with 
> multiple keyboards and their LEDs as an excellent example again. If you 
> kill the interrupt URB, there is nothing what will prevent other keyboard 
> (PS/2 or even USB keyboard, which is not yet suspended) to generate an 
> input event (user presses CapsLock/NumLock at a 'right' time). Then you'll 
> get out of sync, won't you?

That gives me an idea.
Resumption of a device has to be done in task context. So if I allocate
a private freezable work queue for HID resumption, the freezer would
guard against illicit resumptions, wouldn't it?

	Regards
		Oliver

-------------------------------------------------------------------------
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/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.