]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/usb.c
Prepare for multiple bootcount drivers
[people/ms/u-boot.git] / common / usb.c
index 88cee810fac1ac88ca7577824fbdf9d07859caca..8d27bc70607560b7c52841f75c3f2fbecf191e94 100644 (file)
@@ -1052,6 +1052,17 @@ static int usb_prepare_device(struct usb_device *dev, int addr, bool do_read,
 
        mdelay(10);     /* Let the SET_ADDRESS settle */
 
+       /*
+        * If we haven't read device descriptor before, read it here
+        * after device is assigned an address. This is only applicable
+        * to xHCI so far.
+        */
+       if (!do_read) {
+               err = usb_setup_descriptor(dev, true);
+               if (err)
+                       return err;
+       }
+
        return 0;
 }