Re: suspending hid devices

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Montag, 29. Januar 2007 14:59 schrieb Jiri Kosina:
> On Mon, 29 Jan 2007, Oliver Neukum wrote:
> 
> > currently hid-core's suspend() method only kills the input URB and 
> > leaves the output URB alone. I am afraid this is incorrect. I've done a 
> > patch, but I am looking for a solution regarding resumption. It seems to 
> > me that it might wake up tasks too early. Comments?
> 
> Hi Oliver,
> 
> thanks, I think that basically killing output URBs is a good thing to do,

I've looked further and the control URB will have to die, too.

> however the resuming will need some more thinking. What are all the 
> scenarios you can see that waiters on hid->wait will be woken too early?

1) Resubmitting the IO upon resume() fails, error must be reported
2) The output transfer finishes before tasks are unfrozen

Basically output requests are stored in usbhid->out. There may be several
requests in the queue. The alternative would be to drain the queue in
suspend(). The problem is that I have no idea how long that might take.

	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
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.