diff options
author | Felipe Balbi | 2015-09-21 14:32:00 -0500 |
---|---|---|
committer | Felipe Balbi | 2015-09-28 14:17:26 -0500 |
commit | 8a1a9c9e4503f246b1d4339c5be3485e14c31858 (patch) | |
tree | 55b414f041b6d3a7c45b56ee616db6d62b1e39d8 /drivers/usb/dwc3 | |
parent | 9903b6bedd389a033a3da0308f220571c7f68e7a (diff) |
usb: dwc3: gadget: start transfer on XFER_COMPLETE
if by the time we get to XFER_COMPLETE we have
pending requests to be processed, instead of waiting
for a following XFER_NOT_READY, let's start the request
right away and, maybe, save the time of a few NAKs
due to lack of started transfers.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 201e12342447..c57e2002bcff 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1967,6 +1967,14 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, dwc->u1u2 = 0; } + + if (is_xfer_complete && !usb_endpoint_xfer_isoc(dep->endpoint.desc)) { + int ret; + + ret = __dwc3_gadget_kick_transfer(dep, 0, 1); + if (!ret || ret == -EBUSY) + return; + } } static void dwc3_endpoint_interrupt(struct dwc3 *dwc, |