diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-24 14:38:10 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-25 12:13:21 +0300 |
commit | 594e121f25689baaf1c8c9b006701e66744d5838 (patch) | |
tree | 6c5b445d2c102b4b27ff672f68a79acf6c81ee55 /drivers/usb | |
parent | 7ae7df4982af6aed25c5e9e71b91027a494149de (diff) |
usb: dwc3: gadget: stop kicking if we run out of space
In case our TRB ring is full, we can avoid trying to
kick transfers which won't start and just add requests
to the queue.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 104b145f506d..37a86522fa88 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1082,6 +1082,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) return 0; } + if (!dwc3_calc_trbs_left(dep)) + return 0; + ret = __dwc3_gadget_kick_transfer(dep, 0); if (ret && ret != -EBUSY) dwc3_trace(trace_dwc3_gadget, |