libpayload/usb: wait a millisecond to work around device bugs
Some USB sticks seem to send a NAK at a place where they mustn't by spec, leading to a controller side error condition. To avoid it, wait a millisecond which is enough to get past the NAK condition. That delay only happens on device discovery so it won't affect boot time by more than 1ms per device. BUG=chromium:414959 BRANCH=none TEST=depthcharge recognizes a Lexar 16GB USB stick after applying this change. Change-Id: I6dd5ca34e9f3767003ccb0ca9daaf16116f4a2df Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/228791 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Sheng-liang Song <ssl@chromium.org>
This commit is contained in:
parent
1e8cdbdb07
commit
10bbfda839
1 changed files with 3 additions and 0 deletions
|
|
@ -393,6 +393,9 @@ set_address (hci_t *controller, usb_speed speed, int hubport, int hubaddr)
|
|||
usb_detach_device (controller, dev->address);
|
||||
return -1;
|
||||
}
|
||||
/* workaround for some USB devices: wait until they're ready, or
|
||||
* they send a NAK when they're not allowed to do. 1ms is enough */
|
||||
mdelay(1);
|
||||
dev->configuration = malloc(buf[1]);
|
||||
if (!dev->configuration) {
|
||||
usb_debug ("could not allocate %d bytes for DT_CFG\n", buf[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue