Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: dwc3: Ignore late xferNotReady event to prevent halt timeout

During a device-initiated disconnect, the End Transfer command resets
the event filter, allowing a new xferNotReady event to be generated
before the controller is fully halted. Processing this late event
incorrectly triggers a Start Transfer, which prevents the controller
from halting and results in a DSTS.DEVCTLHLT bit polling timeout.

Ignore the late xferNotReady event if the controller is already in a
disconnected state.

Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20250807090700.2397190-1-khtsai@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kuen-Han Tsai and committed by
Greg Kroah-Hartman
58577118 6ca8af3c

+9
+9
drivers/usb/dwc3/gadget.c
··· 3777 3777 static void dwc3_gadget_endpoint_transfer_not_ready(struct dwc3_ep *dep, 3778 3778 const struct dwc3_event_depevt *event) 3779 3779 { 3780 + /* 3781 + * During a device-initiated disconnect, a late xferNotReady event can 3782 + * be generated after the End Transfer command resets the event filter, 3783 + * but before the controller is halted. Ignore it to prevent a new 3784 + * transfer from starting. 3785 + */ 3786 + if (!dep->dwc->connected) 3787 + return; 3788 + 3780 3789 dwc3_gadget_endpoint_frame_from_event(dep, event); 3781 3790 3782 3791 /*