]> git.hungrycats.org Git - linux/commit
usb: dwc3: gadget: Submit endxfer command if delayed during disconnect
authorWesley Cheng <quic_wcheng@quicinc.com>
Thu, 1 Sep 2022 19:36:25 +0000 (12:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:55:11 +0000 (08:55 +0100)
commit352b38d15c6d8122f5c6b8893d99f9378d5591d8
tree0631e3a4627a71e8333615f2d049d932b6796314
parent9cccdcc95e33c3969729a5c53f9e3c560d657e1d
usb: dwc3: gadget: Submit endxfer command if delayed during disconnect

[ Upstream commit 8422b769fa46bd429dc0f324012629a4691f0dd9 ]

During a cable disconnect sequence, if ep0state is not in the SETUP phase,
then nothing will trigger any pending end transfer commands.  Force
stopping of any pending SETUP transaction, and move back to the SETUP
phase.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220901193625.8727-6-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