[U-Boot] [PATCH 1/1] tegra: usb: Fix device enumeration problem of USB1
Stephen Warren
swarren at wwwdotorg.org
Thu Jun 14 20:09:02 CEST 2012
On 06/14/2012 04:40 AM, Jim Lin wrote:
> For some reason, bit 1 (connect status change) of PORTSC will be set
> after issuing Port Reset (like "usb reset" in u-boot command line).
> This will be treated as an error and stops later device enumeration.
>
> Therefore we add a definition in header file to ignore checking of that bit
> after Port Reset.
> CONFIG_USB_RESET_IGNORE_CONNECT_CHANGE
(Again, I'm CC'ing the USB maintainer here)
Looking at the Linux kernel's Tegra EHCI driver:
a) This WAR is only needed on the first USB port, not all of them.
b) This WAR is not complete; there's a loop in the kernel that resets
the port twice in order to guarantee that the port will become enabled.
c) The kernel driver actively clears this CSC bit rather than leaving it
set and ignoring it. Is there any implication to this difference?
So, rather than just ifdef'ing this fix into the driver, wouldn't it be
better to add a callback from the USB core into the USB driver, so that
the Tegra EHCI driver could choose to only implement this WAR for port
1, and also do the multiple-reset-loop thing.
Finally, in the change description, the text "for some reason" is quite
unclear; it sounds like you have absolutely no idea why this happens. Is
this a known and root-caused HW bug for which this fix has been fully
validated? Or, is this patch just some random hack that seems to work
for you?
More information about the U-Boot
mailing list