usb: dwc3: gadget: Properly handle ClearFeature(halt)
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 5 Mar 2020 21:23:55 +0000 (13:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:23 +0000 (17:50 +0200)
commit1bfa0914728229f332478a0ba9f60a92f0dca046
treec740f19e5a79d9ed66689524b2f9fad9b2279702
parente320bb0e01dbd11913ed96192ecb847f12e201be
usb: dwc3: gadget: Properly handle ClearFeature(halt)

[ Upstream commit cb11ea56f37a36288cdd0a4799a983ee3aa437dd ]

DWC3 must not issue CLEAR_STALL command to control endpoints. The
controller automatically clears the STALL when it receives the SETUP
token. Also, when the driver receives ClearFeature(halt_ep), DWC3 must
stop any active transfer from the endpoint and give back all the
requests to the function drivers.

Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/gadget.c