|
@@ -4384,6 +4384,7 @@ static int _dwc2_hcd_start(struct usb_hcd *hcd)
|
|
|
struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
|
|
|
struct usb_bus *bus = hcd_to_bus(hcd);
|
|
|
unsigned long flags;
|
|
|
+ int ret;
|
|
|
|
|
|
dev_dbg(hsotg->dev, "DWC OTG HCD START\n");
|
|
|
|
|
@@ -4399,6 +4400,13 @@ static int _dwc2_hcd_start(struct usb_hcd *hcd)
|
|
|
|
|
|
dwc2_hcd_reinit(hsotg);
|
|
|
|
|
|
+ /* enable external vbus supply before resuming root hub */
|
|
|
+ spin_unlock_irqrestore(&hsotg->lock, flags);
|
|
|
+ ret = dwc2_vbus_supply_init(hsotg);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
+ spin_lock_irqsave(&hsotg->lock, flags);
|
|
|
+
|
|
|
/* Initialize and connect root hub if one is not already attached */
|
|
|
if (bus->root_hub) {
|
|
|
dev_dbg(hsotg->dev, "DWC OTG HCD Has Root Hub\n");
|
|
@@ -4408,7 +4416,7 @@ static int _dwc2_hcd_start(struct usb_hcd *hcd)
|
|
|
|
|
|
spin_unlock_irqrestore(&hsotg->lock, flags);
|
|
|
|
|
|
- return dwc2_vbus_supply_init(hsotg);
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
/*
|