usb: dwc2: Defer forcing peripheral mode
[platform/kernel/linux-rpi.git] / drivers / usb / dwc2 / core.c
index 81f6843..f755d73 100644 (file)
@@ -581,7 +581,12 @@ void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg)
 
                break;
        case USB_DR_MODE_PERIPHERAL:
-               dwc2_force_mode(hsotg, false);
+               /*
+                * To prevent early notification to host without any
+                * preparation about device descriptor, forcing mode
+                * is defered until gadget driver is ready.
+                */
+               /* dwc2_force_mode(hsotg, false); */
                break;
        case USB_DR_MODE_OTG:
                dwc2_clear_force_mode(hsotg);