blob: 4ae77a9dd932e7f16a6148b0cac2dc8287575f77 [file] [log] [blame]
From: Felipe Balbi <felipe.balbi@linux.intel.com>
Date: Wed, 10 Aug 2016 12:35:30 +0300
Subject: usb: dwc3: gadget: always cleanup all TRBs
commit 7c705dfe2ebe731c8fd068623b6b4df2d3512c08 upstream.
If we stop earlier due to short packet, we will
not be able to giveback all TRBs.
Cc: Brian E Rogers <brian.e.rogers@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/dwc3/gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1943,7 +1943,7 @@ static int __dwc3_cleanup_done_trbs(stru
s_pkt = 1;
}
- if (s_pkt)
+ if (s_pkt && !chain)
return 1;
if ((event->status & DEPEVT_STATUS_LST) &&
(trb->ctrl & (DWC3_TRB_CTRL_LST |