[U-Boot] [PATCH 1/1] tegra: usb: Fix device enumeration problem of USB1

Jim Lin jilin at nvidia.com
Fri Jun 15 11:38:29 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.

  [Jim] No penalty for USB2 and USB3 ports. Because u-boot hub_port_reset
  has at most 5 times of retry for a port.
  USB2 and USB3 ports will reset once in retry loop
  ('port connect change' bit will not set after reset).
  USB1 will have at most 2 times of reset in the retry loop after adding
  this patch.

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

  [Jim] Disagree. Because u-boot hub_port_reset has at most 5 times of retry
  for a port. U-boot and kernel code are not entirely same.

>c) The kernel driver actively clears this CSC bit rather than leaving it
>set and ignoring it. Is there any implication to this difference?

  [Jim] I can make next change to be consistent with kernel driver to clear
  CSC bit after Port Reset.

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

  [Jim] No callback for me to cut in. Also no penalty for other ports.

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

  [Jim] This is a known and root-caused HW bug.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the U-Boot mailing list