]> git.hungrycats.org Git - linux/commit
usb: dwc3: gadget: Force sending delayed status during soft disconnect
authorWesley Cheng <quic_wcheng@quicinc.com>
Wed, 17 Aug 2022 18:23:52 +0000 (11:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:55:11 +0000 (08:55 +0100)
commit9cccdcc95e33c3969729a5c53f9e3c560d657e1d
tree4f2524404dd5c920c41cb3a33b0215ad9a6fd20f
parent1ea8a2a532e96c6d1680a86932a52d1268815958
usb: dwc3: gadget: Force sending delayed status during soft disconnect

[ Upstream commit e1ee843488d58099a89979627ef85d5bd6c5cacd ]

If any function drivers request for a delayed status phase, this leads to a
SETUP transfer timeout error, since the function may take longer to process
the DATA stage.  This eventually results in end transfer timeouts, as there
is a pending SETUP transaction.

In addition, allow the DWC3_EP_DELAY_STOP to be set for if there is a
delayed status requested.  Ocasionally, a host may abort the current SETUP
transaction, by issuing a subsequent SETUP token.  In those situations, it
would result in an endxfer timeout as well.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220817182359.13550-3-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 730e12fbec53 ("usb: dwc3: gadget: Handle EP0 request dequeuing properly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/gadget.c