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

Commit e8d4e8be authored by Pratyush Anand's avatar Pratyush Anand Committed by Felipe Balbi
Browse files

usb: dwc3: fix giveback of queued request in ep_dequeue



In case of ep_dequeue , if dequeued request was submitted for dma
transfer, then endpoint is stopped. Once endpoint is stooped, callback
for the dequeued request must be called.

Signed-off-by: default avatarPratyush Anand <pratyush.anand@st.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 2347fc44
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1091,7 +1091,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
		if (r == req) {
		if (r == req) {
			/* wait until it is processed */
			/* wait until it is processed */
			dwc3_stop_active_transfer(dwc, dep->number);
			dwc3_stop_active_transfer(dwc, dep->number);
			goto out0;
			goto out1;
		}
		}
		dev_err(dwc->dev, "request %p was not queued to %s\n",
		dev_err(dwc->dev, "request %p was not queued to %s\n",
				request, ep->name);
				request, ep->name);
@@ -1099,6 +1099,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
		goto out0;
		goto out0;
	}
	}


out1:
	/* giveback the request */
	/* giveback the request */
	dwc3_gadget_giveback(dep, req, -ECONNRESET);
	dwc3_gadget_giveback(dep, req, -ECONNRESET);