summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-07-26 13:26:50 +0300
committerFelipe Balbi <balbi@ti.com>2014-03-05 14:40:03 -0600
commitb997ada5db905e24494bcc689c7b2c07d278ca27 (patch)
tree0407d53f969b0a85c257c1ce78b0000aab38fc3f /drivers/usb/dwc3
parentbc5ba2e0b829c9397f96df1191c7d2319ebc36d9 (diff)
usb: dwc3: gadget: pre-start Stream transfers when they're queued
we need to pre-start stream transfers otherwise we will never know when to start them. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 9f82436b4b1..1730cd0928c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -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;
}