libpayload: usbmsc: Add small delay during initialization to fix CZ60

We found that some SanDisk Cruizer Glide CZ60 sticks (confirmed on 16GB
and 64GB versions) have a problem responding to our first GET_MAX_LUNS
request right after they received their SET_CONFIGURATION. They will
continually return a NAK until the host gives up (which is 2
user-noticable seconds for us). Adding a small delay of about 15us seems
to be enough to fix the issue, but let's do 50 to be save.

Confirmed with both MT8173 and Intel LynxPoint XHCI controllers.

BRANCH=None
BUG=chrome-os-partner:45473
TEST=No notable delay before detecting stick on Oak and Falco.

Change-Id: Ib03944d6484de0ccecbb9922d22666f54c9d53dd
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 589f19a901275fb8b00de4595763a7d577bed524
Original-Change-Id: I95c79fe40d3ad79f37ce2eb586836e5de55be454
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/308980
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/12229
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Julius Werner 2015-10-26 11:44:00 -07:00 committed by Patrick Georgi
parent 564fbbeac9
commit 8db7e6702b
1 changed files with 3 additions and 0 deletions

View File

@ -660,6 +660,9 @@ usb_msc_init (usbdev_t *dev)
MSC_INST (dev)->bulk_in->endpoint, MSC_INST (dev)->bulk_in->endpoint,
MSC_INST (dev)->bulk_out->endpoint); MSC_INST (dev)->bulk_out->endpoint);
/* Some sticks need a little more time to get ready after SET_CONFIG. */
udelay(50);
initialize_luns (dev); initialize_luns (dev);
usb_debug (" has %d luns\n", MSC_INST (dev)->num_luns); usb_debug (" has %d luns\n", MSC_INST (dev)->num_luns);