Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddbcdfe6 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: delay clearing run/stop when setup just arrived"

parents 5cee94ad b1e31d88
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2189,7 +2189,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,