]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: Do not clear ep delayed stop flag during ep disable
authorWesley Cheng <quic_wcheng@quicinc.com>
Mon, 19 Sep 2022 23:12:13 +0000 (16:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2022 13:52:29 +0000 (15:52 +0200)
commitc10223f3b0dd8804b5f253788dde4ad4fa76d476
treeb43fb6909a133801663e419b7b1e412a0f991b20
parent6b5cc2d6ab771f5f2b5a4edc2fc91112514baa14
usb: dwc3: gadget: Do not clear ep delayed stop flag during ep disable

DWC3_EP_DELAYED_STOP is utilized to defer issuing the end transfer command
until the subsequent SETUP stage, in order to avoid end transfer timeouts.
During cable disconnect scenarios, __dwc3_gadget_ep_disable() is
responsible for ensuring endpoints have no active transfers pending.  Since
dwc3_remove_request() can now exit early if the EP delayed stop is set,
avoid clearing all DEP flags, otherwise the transition back into the SETUP
stage won't issue an endxfer command.

Fixes: aab7ba4e2c0f ("usb: dwc3: Avoid unmapping USB requests if endxfer is not complete")
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220919231213.21364-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c