Skip to content

Commit

Permalink
usb: dwc3: gadget: start transfer on XFER_COMPLETE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Sep 28, 2015
1 parent 9903b6b commit 8a1a9c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8a1a9c9

Please sign in to comment.