On Tue, 12 Jun 2007, Tomohiro Kusumi wrote:

> Hi Alan
> 
>  > This could be a problem with the BIOS.  You might try going through the
>  > BIOS setup and turning off support for Legacy USB or anything else
>  > which might cause the BIOS to interfere with USB operations.
> 
>   Thanks for pointing out the possible BIOS problem regarding
>   the EHCI port status register problem a few weeks ago.
>   I went through the BIOS setup but all the Legacy USB stuffs
>   are turned off. Changing USB settings didn't affect the result.
> 
>   So right now I'm trying to see if I can make workaround by changing
>   ehci_hub_status_data() function. As I've explained before, the problem
>   is that the port status register is 0x1005 when it should be something
>   like 0x1803. As a result ehci_hub_status_data() returns 0 and
>   mod_timer(hcd->rh_timer, jiffies+HZ/4) is called forever.
> 
>   I tried to write 0x1803 to the register when it has 0x1005,
>   but it didn't work. It got back to 0x1005 when ehci_hub_status_data()
>   is called next time.
> 
>   Up until the 2.6.21 kernel (I'm using 2.6.9) it seems that the logic
>   hasn't been changed much, which continues to do ehci_hub_status_data()
>   until certain bits are turned on. Is it possible to get out of this
>   timer function loop, and let the driver detect the USB device?
>   Any suggestions would be helpful.

The easiest solution is to replace your EHCI hardware with a non-broken 
controller.

But if you want a software workaround, here's what you can do.  During 
ehci_irq() when you see that connect-change bit is on, you should set a 
bitflag.  Turn off the bitflag in ehci_hub_control() when you get a 
ClearPortFeature request for USB_PORT_FEAT_C_CONNECTION.  Then use the 
bitflag in ehci_hub_status_data() and in the GetPortStatus case of 
ehci_hub_control(); when the flag is set turn on the appropriate bit of 
the return value.

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