Re: [PATCH] usb: dwc3: Increase no-IOC ENDTRANSFER delay

From: Thinh Nguyen

Date: Wed Nov 11 2026 - 20:55:11 EST


Hi,

On Tue, Nov 03, 2026, Elson Serrao wrote:
> When ENDTRANSFER is issued without CMDIOC, software does not wait for
> command completion and instead relies on a fixed delay before continuing
> request teardown. The DWC3 programming guide recommends using a timeout
> greater than 1 ms for command completion. Increase the post-ENDTRANSFER
> delay to 2 ms to provide additional margin before request teardown. This
> prevents SMMU faults that can occur when the controller accesses unmapped
> requests before ENDTRANSFER processing has completed.
>
> Fixes: d8a2bb4eb758 ("usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Elson Serrao <elson.serrao@xxxxxxxxxxxxxxxx>
> ---
> The DWC3 programming guide recommends a delay greater than 1 ms for
> ENDTRANSFER completion without CMDIOC, but does not specify a worst-case
> completion time. The delay is increased to 2 ms to provide additional
> margin based on observed failures.

Which platform and controller version did you see this on? What was the
connected speed? And where did the failure occur? usb_ep_disable() or
reset/disconnect?

Can you test against Greg's usb-linus branch? It has some changes to End
Transfer command handling. Note that the usb_ep_disable() now issues End
Transfer with CMDIOC and the delay moved to dwc3_remove_requests(), so
this patch no longer covers that path. Any change would need to go on
top of that.

Thanks,
Thinh