Skip to content

Commit 5d2fb07

Browse files
Thinh Nguyengregkh
authored andcommitted
usb: dwc3: ep0: Don't clear ep0 DWC3_EP_TRANSFER_STARTED
The driver cannot issue the End Transfer command to the SETUP transfer. Don't clear DWC3_EP_TRANSFER_STARTED flag to make sure that the driver won't send Start Transfer command again, which can cause no-resource error. For example this can occur if the host issues a reset to the device. Cc: [email protected] Fixes: 76cb323 ("usb: dwc3: ep0: clear all EP0 flags") Signed-off-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/d3d618185fd614bb7426352a9fc1199641d3b5f5.1731545781.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 51cdd69 commit 5d2fb07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/dwc3/ep0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
232232
/* stall is always issued on EP0 */
233233
dep = dwc->eps[0];
234234
__dwc3_gadget_ep_set_halt(dep, 1, false);
235-
dep->flags &= DWC3_EP_RESOURCE_ALLOCATED;
235+
dep->flags &= DWC3_EP_RESOURCE_ALLOCATED | DWC3_EP_TRANSFER_STARTED;
236236
dep->flags |= DWC3_EP_ENABLED;
237237
dwc->delayed_status = false;
238238

0 commit comments

Comments
 (0)