usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 Jan 2019 10:58:27 +0000 (12:58 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 1 Feb 2019 06:30:44 +0000 (08:30 +0200)
commitacbfa6c26f21a18830ee064b588c92334305b6af
tree9a26b513c135dfd3dff49dd149b5ccff082e1afe
parent7c3d7dc89e57a1d43acea935882dd8713c9e639f
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete

We must wait until End Transfer completes in order to clear
DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver.

This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.

Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c