summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>2019-11-27 13:10:47 -0800
committerFelipe Balbi <balbi@kernel.org>2019-12-10 14:52:41 +0200
commitd3abda5a98a18e524e17fd4085c9f4bd53e9ef53 (patch)
tree41b2da4a83b9873a71f5671c8cbc0f1f3a74eed5 /drivers/usb
parent8c7d4b7b3d43c54c0b8c1e4adb917a151c754196 (diff)
downloadlinux-d3abda5a98a18e524e17fd4085c9f4bd53e9ef53.tar.bz2
usb: dwc3: gadget: Clear started flag for non-IOC
Normally the END_TRANSFER command completion handler will clear the DWC3_EP_TRANSFER_STARTED flag. However, if the command was sent without interrupt on completion, then the flag will not be cleared. Make sure to clear the flag in this case. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 6ff6ee4fe5aa..0c960a97ea02 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2719,6 +2719,9 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
WARN_ON_ONCE(ret);
dep->resource_index = 0;
+ if (!interrupt)
+ dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
+
if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A)
udelay(100);
}