Skip to content

Commit

Permalink
usb: dwc3: gadget: pre-start Stream transfers when they're queued
Browse files Browse the repository at this point in the history
we need to pre-start stream transfers otherwise we
will never know when to start them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 5, 2014
1 parent bc5ba2e commit b997ada
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,23 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
return ret;
}

/*
* 4. Stream Capable Bulk Endpoints. We need to start the transfer
* right away, otherwise host will not know we have streams to be
* handled.
*/
if (dep->stream_capable) {
int ret;

ret = __dwc3_gadget_kick_transfer(dep, 0, true);
if (ret && ret != -EBUSY) {
struct dwc3 *dwc = dep->dwc;

dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
dep->name);
}
}

return 0;
}

Expand Down

0 comments on commit b997ada

Please sign in to comment.