usb: dwc3: gadget: use Update Transfer from Xfer In Progress
authorFelipe Balbi <balbi@ti.com>
Mon, 28 Sep 2015 20:16:56 +0000 (15:16 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 28 Sep 2015 20:19:31 +0000 (15:19 -0500)
Instead of limiting __dwc3_gadget_kick_transfer() to
Xfer Complete, we can try to issue Update Transfer
command from Xfer In Progress too.

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

index ee3d05fa674d36d308b248c66e105d0c364f8b25..81bfb9ad1e2ebbf99a1b874e893a64cd92aca61e 100644 (file)
@@ -1968,10 +1968,10 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc,
                dwc->u1u2 = 0;
        }
 
-       if (is_xfer_complete && !usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
+       if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
                int ret;
 
-               ret = __dwc3_gadget_kick_transfer(dep, 0, 1);
+               ret = __dwc3_gadget_kick_transfer(dep, 0, is_xfer_complete);
                if (!ret || ret == -EBUSY)
                        return;
        }