usb: dwc2: Init desc_before_addr
authorMarek Vasut <marex@denx.de>
Tue, 26 Apr 2016 01:02:35 +0000 (03:02 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 3 May 2016 17:21:18 +0000 (19:21 +0200)
Initialize desc_before_addr, otherwise the USB core won't send the
first 64B Get Device Descriptor request in common/usb.c function
usb_setup_descriptor() . There are some USB devices which expect
this sequence and otherwise can misbehave.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Tom Rini <trini@konsulko.com>
drivers/usb/host/dwc2.c

index 0c4adafee249d19c9766de575dd612099c971e18..30b51b3d7f296b1b31cfd3b0937c96ae965d3203 100644 (file)
@@ -1201,6 +1201,9 @@ static int dwc2_usb_ofdata_to_platdata(struct udevice *dev)
 static int dwc2_usb_probe(struct udevice *dev)
 {
        struct dwc2_priv *priv = dev_get_priv(dev);
+       struct usb_bus_priv *bus_priv = dev_get_uclass_priv(dev);
+
+       bus_priv->desc_before_addr = true;
 
        return dwc2_init_common(priv);
 }