Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Elson Serrao <elson.serrao@oss.qualcomm.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Increase no-IOC ENDTRANSFER delay
Date: Thu, 12 Nov 2026 01:46:33 +0000	[thread overview]
Message-ID: <avUVrw-Wtr22ZS3s@vbox> (raw)
In-Reply-To: <20261103182953.3437202-1-elson.serrao@oss.qualcomm.com>

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@vger.kernel.org
> Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
> ---
> 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

      reply	other threads:[~2026-11-12  1:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 18:29 [PATCH] usb: dwc3: Increase no-IOC ENDTRANSFER delay Elson Serrao
2026-11-12  1:46 ` Thinh Nguyen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avUVrw-Wtr22ZS3s@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=elson.serrao@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox