aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <[email protected]>2020-05-04 23:12:15 +0000
committerFelipe Balbi <[email protected]>2020-05-09 11:04:49 +0300
commit00e21763f2c8cab21b7befa52996d1b18bde5c42 (patch)
tree37c50228cc028e23fbb5ab92cdab2b093d8f4f6b
parentd5eeab8d7e269e8cfc53b915bccd7bd30485bcbf (diff)
dwc3: Remove check for HWO flag in dwc3_gadget_ep_reclaim_trb_sg()
The check for the HWO flag in dwc3_gadget_ep_reclaim_trb_sg() causes us to break out of the loop before we call dwc3_gadget_ep_reclaim_completed_trb(), which is what likely should be clearing the HWO flag. This can cause odd behavior where we never reclaim all the trbs in the sg list, so we never call giveback on a usb req, and that will causes transfer stalls. This effectively resovles the adb stalls seen on HiKey960 after userland changes started only using AIO in adbd. Cc: YongQin Liu <[email protected]> Cc: Anurag Kumar Vulisha <[email protected]> Cc: Yang Fei <[email protected]> Cc: Thinh Nguyen <[email protected]> Cc: Tejas Joglekar <[email protected]> Cc: Andrzej Pietrasiewicz <[email protected]> Cc: Jack Pham <[email protected]> Cc: Josh Gao <[email protected]> Cc: Todd Kjos <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Cc: [email protected] #4.20+ Signed-off-by: John Stultz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 00746c2848c0..585cb3deea7a 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2483,9 +2483,6 @@ static int dwc3_gadget_ep_reclaim_trb_sg(struct dwc3_ep *dep,
for_each_sg(sg, s, pending, i) {
trb = &dep->trb_pool[dep->trb_dequeue];
- if (trb->ctrl & DWC3_TRB_CTRL_HWO)
- break;
-
req->sg = sg_next(s);
req->num_pending_sgs--;