Skip to content

Commit

Permalink
usb: dwc3: fix giveback of queued request in ep_dequeue
Browse files Browse the repository at this point in the history
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: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Pratyush Anand authored and Felipe Balbi committed Jun 15, 2012
1 parent 2347fc4 commit e8d4e8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,14 +1091,15 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
if (r == req) {
/* wait until it is processed */
dwc3_stop_active_transfer(dwc, dep->number);
goto out0;
goto out1;
}
dev_err(dwc->dev, "request %p was not queued to %s\n",
request, ep->name);
ret = -EINVAL;
goto out0;
}

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

Expand Down

0 comments on commit e8d4e8b

Please sign in to comment.