EHCI port reset problem

=?ks_c_5601-1987?B?sei5zsf8?= <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hi everyone!!

I am Minhyoung Kim working for LG Electronics and a beginner in USB device
driver.
I found a bug that EHCI port is in reset forever, when I repeated the
following action.
Action : Immediately disconnecting a USB device just after connecting the
device.

In this situation, ehci_hub_status_data is executed prior to
ehci_hub_control which is called by get_port_status.

ehci_hub_status_data function set ehci->reset_done to zero because no
device is present.
So, ehci_hub_control can¡¯t clear PORT_RESET bit. 

This is my test environment:
Kernel Version - 2.6.12
USB controller - Broadcom (EHCI/OHCI)

First, I wonder if this kind of bug is already reported. If so, please, let
me know a patch.
(I tried to find a similar problem in linux-usb-devel email archive, but I
didn¡¯t find anything.)

Second, I wonder why ehci_hub_status_data doesn¡¯t check PORT_RESET status
before setting ehci->reset_done to zero.
When I modified ehci_hub_status_data like the following, the problem is
cleared.

Before:
if (!(temp & PORT_CONNECT))
             ehci->reset_done [i] = 0;

After: 
if (!(temp & PORT_CONNECT) && !(temp & PORT_RESET))
             ehci->reset_done [i] = 0;

I always really thank for your help and effort.
Regards,
Minhyoung Kim


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[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.