mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
usb: dwc3: gadget: Ignore EP queue requests during bus reset
[ Upstream commit 71ca43f30d ]
The current dwc3_gadget_reset_interrupt() will stop any active
transfers, but only addresses blocking of EP queuing for while we are
coming from a disconnected scenario, i.e. after receiving the disconnect
event. If the host decides to issue a bus reset on the device, the
connected parameter will still be set to true, allowing for EP queuing
to continue while we are disabling the functions. To avoid this, set the
connected flag to false until the stop active transfers is complete.
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1616146285-19149-3-git-send-email-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
85eb84bd81
commit
45f879b29d
@@ -3267,6 +3267,15 @@ static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/*
|
||||
* Ideally, dwc3_reset_gadget() would trigger the function
|
||||
* drivers to stop any active transfers through ep disable.
|
||||
* However, for functions which defer ep disable, such as mass
|
||||
* storage, we will need to rely on the call to stop active
|
||||
* transfers here, and avoid allowing of request queuing.
|
||||
*/
|
||||
dwc->connected = false;
|
||||
|
||||
/*
|
||||
* WORKAROUND: DWC3 revisions <1.88a have an issue which
|
||||
* would cause a missing Disconnect Event if there's a
|
||||
|
||||
Reference in New Issue
Block a user