From: Christian Eggers <ceggers@arri.de>
To: barebox@lists.infradead.org
Cc: Christian Eggers <ceggers@arri.de>,
Primoz Fiser <primoz.fiser@norik.com>
Subject: [PATCH] usb: Add extra delay for device scan
Date: Mon, 9 Mar 2020 15:20:26 +0100 [thread overview]
Message-ID: <20200309142026.26208-1-ceggers@arri.de> (raw)
Since b1d9837182, detection of various USB flash drives stopped working.
While the changes itself look correct, probably the HUB requires some
"recovery time" between the GET_STATUS commands in order to be able to
detect devices.
Our configuration: i.MX6ULL (USB-OTG) with only one port on the root
HUB. This port is connected to a Microchip USB4916 hub (permanently
attached). The USB4916 is configured with it's power on defaults which
means that bPwrOn2PwrGood is set to the maximum (0xFF = 510 ms).
Fixes: b1d9837182 ("b1d9837182d2b20232234adb36ada2129c3a8152")
Signed-off-by: Christian Eggers <ceggers@arri.de>
---
drivers/usb/core/hub.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 8874775f17..466bbe527b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -406,6 +406,9 @@ static int usb_device_list_scan(void)
if (ret)
goto out;
}
+
+ /* Avoid hammering the HUB with port scans */
+ mdelay(25);
}
out:
--
Christian Eggers
Embedded software developer
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-03-09 14:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 14:20 Christian Eggers [this message]
2020-03-10 9:42 ` Roland Hieber
2020-03-10 10:32 ` Christian Eggers
2020-03-11 15:04 ` Sascha Hauer
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=20200309142026.26208-1-ceggers@arri.de \
--to=ceggers@arri.de \
--cc=barebox@lists.infradead.org \
--cc=primoz.fiser@norik.com \
/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