Skip to content

Commit

Permalink
usb: dwc3: gadget: use update transfer command
Browse files Browse the repository at this point in the history
If we get a Xfer Not Ready event with reason
"Transfer Active" it means endpoint is still
transferring data and we can use that to issue
update transfer for this particular endpoint
in case we have pending requests in our queue.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Sep 28, 2015
1 parent 8a1a9c9 commit 6bb4fe1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,15 +2012,16 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
dwc3_gadget_start_isoc(dwc, dep, event);
} else {
int active;
int ret;

active = event->status & DEPEVT_STATUS_TRANSFER_ACTIVE;

dwc3_trace(trace_dwc3_gadget, "%s: reason %s",
dep->name, event->status &
DEPEVT_STATUS_TRANSFER_ACTIVE
? "Transfer Active"
dep->name, active ? "Transfer Active"
: "Transfer Not Active");

ret = __dwc3_gadget_kick_transfer(dep, 0, 1);
ret = __dwc3_gadget_kick_transfer(dep, 0, !active);
if (!ret || ret == -EBUSY)
return;

Expand Down

0 comments on commit 6bb4fe1

Please sign in to comment.