From: Marek Vasut Date: Wed, 27 Apr 2016 01:08:12 +0000 (+0200) Subject: usb: Wait after sending Set Configuration request X-Git-Tag: v2016.05~8^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f647bf0ba36a5236d4bc7f93d39bfacfb1cfe6c7;p=oweals%2Fu-boot.git usb: Wait after sending Set Configuration request Some devices, like the SanDisk Cruzer Pop need some time to process the Set Configuration request, so wait a little until they are ready. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Hans de Goede Cc: Stefan Roese Cc: Stephen Warren --- diff --git a/common/usb.c b/common/usb.c index 63429d4d5a..205041b6a6 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1107,6 +1107,14 @@ int usb_select_config(struct usb_device *dev) "len %d, status %lX\n", dev->act_len, dev->status); return err; } + + /* + * Wait until the Set Configuration request gets processed by the + * device. This is required by at least SanDisk Cruzer Pop USB 2.0 + * and Kingston DT Ultimate 32GB USB 3.0 on DWC2 OTG controller. + */ + mdelay(10); + debug("new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);