diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-02-11 11:17:23 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-02-11 11:17:23 +0300 |
commit | e65372124cd749ebbe4ac2abe5a511d7d1ac68db (patch) | |
tree | 1f9fd7cec6ffba19c76fff1e82c562fa1adae5da /drivers/usb/dwc3/gadget.c | |
parent | a3240f09307ac978270d423b542f229e2ccc07b8 (diff) | |
parent | d13937116f1e82bf508a6325111b322c30c85eb9 (diff) | |
download | linux-e65372124cd749ebbe4ac2abe5a511d7d1ac68db.tar.xz |
Merge tag 'v5.0-rc6' into devel
Linux 5.0-rc6
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 07bd31bb2f8a..6c9b76bcc2e1 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -177,6 +177,7 @@ static void dwc3_gadget_del_and_unmap_request(struct dwc3_ep *dep, req->started = false; list_del(&req->list); req->remaining = 0; + req->needs_extra_trb = false; if (req->request.status == -EINPROGRESS) req->request.status = status; @@ -1118,7 +1119,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep, unsigned int maxp = usb_endpoint_maxp(dep->endpoint.desc); unsigned int rem = length % maxp; - if (rem && usb_endpoint_dir_out(dep->endpoint.desc)) { + if ((!length || rem) && usb_endpoint_dir_out(dep->endpoint.desc)) { struct dwc3 *dwc = dep->dwc; struct dwc3_trb *trb; @@ -1984,6 +1985,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc) /* begin to receive SETUP packets */ dwc->ep0state = EP0_SETUP_PHASE; + dwc->link_state = DWC3_LINK_STATE_SS_DIS; dwc3_ep0_out_start(dwc); dwc3_gadget_enable_irq(dwc); @@ -3379,6 +3381,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc) dwc3_disconnect_gadget(dwc); __dwc3_gadget_stop(dwc); + synchronize_irq(dwc->irq_gadget); + return 0; } |