[PATCH v2] usb: dwc2: skip L2 state of hcd if controller work in device mode

2017-08-08 Thread Meng Dongyang
In the case hcd autosuspend is enabled, the hcd will enter L2 state if no device connected. But if the controller works in otg mode, the gadget driver still works in L0 state if connected with host. This may result in transfer fail when gadget enqueue new request but the hcd driver has set the

[PATCH v2] usb: dwc2: skip L2 state of hcd if controller work in device mode

2017-08-08 Thread Meng Dongyang
In the case hcd autosuspend is enabled, the hcd will enter L2 state if no device connected. But if the controller works in otg mode, the gadget driver still works in L0 state if connected with host. This may result in transfer fail when gadget enqueue new request but the hcd driver has set the