summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-10-25 13:54:00 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-03 10:38:41 +0200
commitff377ae47de5c395ec47baabcde0f3011e71ae70 (patch)
treeb6dc21966b5e091cfda0eb5a92325d1fbf75c9f6
parent7282c4ef0b66bb3b715ba8875e4e30392e77c7c1 (diff)
usb: dwc3: gadget: always kick if num_pending_sgs > 0
When we get a half-way processed request, we should make sure to try to prepare further TRBs for it or for any possibly queued up request held in our pending_list. This will make sure our controller is kept busy for as long as possible. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 4643c25702ae..a9c1d75ba7d5 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2123,8 +2123,7 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
req->request.actual = length - req->remaining;
- if (ret && chain && (req->request.actual < length)
- && req->num_pending_sgs)
+ if ((req->request.actual < length) && req->num_pending_sgs)
return __dwc3_gadget_kick_transfer(dep, 0);
dwc3_gadget_giveback(dep, req, status);