usb: dwc3: gadget: pre-start Stream transfers when they're queued
authorFelipe Balbi <balbi@ti.com>
Thu, 26 Jul 2012 10:26:50 +0000 (13:26 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 5 Mar 2014 20:40:03 +0000 (14:40 -0600)
we need to pre-start stream transfers otherwise we
will never know when to start them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 9f82436b4b1ed11992b880e862425d219f8e70de..1730cd0928c5e93967d2d70796cddf90c1b73849 100644 (file)
@@ -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;
 }
 
This page took 0.028833 seconds and 5 git commands to generate.