public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] tegra: usb: Fix device enumeration problem of USB1
Date: Thu, 14 Jun 2012 12:09:02 -0600	[thread overview]
Message-ID: <4FDA28BE.7060104@wwwdotorg.org> (raw)
In-Reply-To: <4B9C9637D5087840A465BDCB251780E9E2D629AF71@HKMAIL02.nvidia.com>

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?

  reply	other threads:[~2012-06-14 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B9C9637D5087840A465BDCB251780E9E2D629AF70@HKMAIL02.nvidia.com>
2012-06-14 10:40 ` [U-Boot] [PATCH 1/1] tegra: usb: Fix device enumeration problem of USB1 Jim Lin
2012-06-14 18:09   ` Stephen Warren [this message]
2012-06-15  9:38     ` Jim Lin
2012-06-15 16:47       ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDA28BE.7060104@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox