mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "usb: dwc3: gadget: delay clearing run/stop when setup just arrived"
This commit is contained in:
commit
3c7ed8087d
1 changed files with 2 additions and 1 deletions
|
|
@ -2055,7 +2055,8 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
|
|||
* Per databook, when we want to stop the gadget, if a control transfer
|
||||
* is still in process, complete it and get the core into setup phase.
|
||||
*/
|
||||
if (!is_on && dwc->ep0state != EP0_SETUP_PHASE) {
|
||||
if (!is_on && (dwc->ep0state != EP0_SETUP_PHASE ||
|
||||
dwc->ep0_next_event != DWC3_EP0_COMPLETE)) {
|
||||
reinit_completion(&dwc->ep0_in_setup);
|
||||
|
||||
ret = wait_for_completion_timeout(&dwc->ep0_in_setup,
|
||||
|
|
|
|||
Loading…
Reference in a new issue