Re: autosuspend for HID devices, take #4

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, 25 Jun 2007, Oliver Neukum wrote:

> Am Montag, 25. Juni 2007 schrieb Jiri Kosina:
> > On Fri, 22 Jun 2007, Oliver Neukum wrote:
> > 
> > > could you please run two tests?
> > > 1. set the autosuspend timeout to 0 (this'll kill usb mice)
> > 
> > And it kills also my testing keyboard on the UHCI system. After the 
> > keyboard gets suspended and I hit a key, it wakes up (the LEDs come up), 
> > but no keypressess are produced and the keyboard gets suspended again.
> 
> I had a hunch that UHCI handles remote wakeup incorrectly while the
> hub above the device is still active. This seems to kill that theory.

Setting the timeout to 0 would cause lots of weird things to happen.  
The driver might not even have time to query the device before it gets 
suspended again!

> > > 2. use a 1.1 hub
> > 
> > I grabbed a random HUB (usbhub4c from Linksys) and this made it work 
> > nicely even on UHCI-based system I am testing on.
> > 
> > I will do some more debugging to check what exactly goes wrong, but I am 
> > leaving for OLS tomorrow.
> 
> Is it a 1.1 hub or a 2.0 hub? If the latter you just switch the device
> to ehci. Did you unload ehci_hcd for the test?
> 
> > BTW I don't know if you recall - I reported previously that the keypresses 
> > are lost only if I try to hit the key very soon after the keyboard gets 
> > suspended. If I wait for 2 seconds (looks like exact value), then no 
> > keypressess are lost and the keyboard wakes up properly.
> 
> Alan, is there something in UHCI that uses that 2 second value?

No.

> That indicates that something's wrong in uhci's root hub code.

Could well be.  I'll try duplicating the experiment: suspend the 
keyboard and less than 2 seconds later type some keys.  I don't have 
the HID-autosuspend patch installed, but a manual suspend with remote 
wakeup should work pretty much the same.

Jiri, I'll look for you at OLS.

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/
_______________________________________________
[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.