diff options
author | Felipe Balbi <balbi@ti.com> | 2015-09-28 14:49:02 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-09-28 15:19:31 -0500 |
commit | 6bb4fe12ea089da98b89dc2630d2273d60fe0c29 (patch) | |
tree | 3365b3e8017a9d26e7fbcc14f9c8e32d17f948f5 /drivers/usb/dwc3 | |
parent | 8a1a9c9e4503f246b1d4339c5be3485e14c31858 (diff) | |
download | blackbird-obmc-linux-6bb4fe12ea089da98b89dc2630d2273d60fe0c29.tar.gz blackbird-obmc-linux-6bb4fe12ea089da98b89dc2630d2273d60fe0c29.zip |
usb: dwc3: gadget: use update transfer command
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>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index c57e2002bcff..ee3d05fa674d 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -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; |