usb: Wait after sending Set Configuration request
authorMarek Vasut <[email protected]>
Wed, 27 Apr 2016 01:08:12 +0000 (03:08 +0200)
committerMarek Vasut <[email protected]>
Fri, 6 May 2016 18:06:56 +0000 (20:06 +0200)
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 <[email protected]>
Cc: Chin Liang See <[email protected]>
Cc: Dinh Nguyen <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Stephen Warren <[email protected]>
common/usb.c

index 63429d4d5a9fcadd2fe15f1497294a0112911b22..205041b6a62b2499abe4b29779b8bf683483fe26 100644 (file)
@@ -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);