diff options
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 1 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 9b94886b66e5..e4d5ca86b9da 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -720,7 +720,6 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, | |||
720 | transferred = min_t(u32, ur->length, | 720 | transferred = min_t(u32, ur->length, |
721 | transfer_size - length); | 721 | transfer_size - length); |
722 | memcpy(ur->buf, dwc->ep0_bounce, transferred); | 722 | memcpy(ur->buf, dwc->ep0_bounce, transferred); |
723 | dwc->ep0_bounced = false; | ||
724 | } else { | 723 | } else { |
725 | transferred = ur->length - length; | 724 | transferred = ur->length - length; |
726 | } | 725 | } |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 58fdfad96b4d..c99568eb4292 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -263,8 +263,11 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, | |||
263 | if (req->request.status == -EINPROGRESS) | 263 | if (req->request.status == -EINPROGRESS) |
264 | req->request.status = status; | 264 | req->request.status = status; |
265 | 265 | ||
266 | usb_gadget_unmap_request(&dwc->gadget, &req->request, | 266 | if (dwc->ep0_bounced && dep->number == 0) |
267 | req->direction); | 267 | dwc->ep0_bounced = false; |
268 | else | ||
269 | usb_gadget_unmap_request(&dwc->gadget, &req->request, | ||
270 | req->direction); | ||
268 | 271 | ||
269 | dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", | 272 | dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n", |
270 | req, dep->name, req->request.actual, | 273 | req, dep->name, req->request.actual, |