From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Michael Grzeschik <mgr@kernel.org>
Cc: Tejas Narendra Joglekar <Tejas.Joglekar@synopsys.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Michael Grzeschik <m.grzeschik@pengutronix.de>,
Selvarasu Ganesan <selvarasu.g@samsung.com>
Subject: [PATCH 0/7] usb: dwc3: gadget: Fix No Resource after End Transfer
Date: Wed, 21 Oct 2026 00:37:45 +0000 [thread overview]
Message-ID: <cover.1792542945.git.Thinh.Nguyen@synopsys.com> (raw)
The dwc3 driver can issue a Start Transfer command while a previous End
Transfer command on the same endpoint has not completed. The controller then
rejects it with "No Resource", and the endpoint stays unusable.
This happens in two cases:
* On ep disable, the End Transfer command is issued without interrupt and its
completion isn't tracked. A quick re-enable or queue to the endpoint can
race with it.
* A timed out End Transfer is treated as done, and the endpoint resource index
is lost.
This series tracks the End Transfer completion on ep disable and on timeout. It
also avoids an unneeded no-op Start Transfer on non-stream endpoints, and
rejects requests queued to an endpoint that is being disabled. If the End
Transfer never completes, the driver recovers through the existing error
recovery, and stale endpoint flags are reset on controller start.
Thanks to Selvarasu for reporting and debugging the issue.
Link: https://lore.kernel.org/linux-usb/20260227121236.963-1-selvarasu.g@samsung.com/
Thinh Nguyen (7):
usb: dwc3: gadget: Reject requests to a disabled endpoint
usb: dwc3: gadget: Track a timed out End Transfer
usb: dwc3: gadget: Clear delayed stop on End Transfer completion
usb: dwc3: gadget: Issue no-op Start Transfer only for stream endpoints
usb: dwc3: gadget: Wait for End Transfer completion on ep disable
usb: dwc3: gadget: Reset endpoint flags on controller start
usb: dwc3: gadget: Recover from End Transfer timeout
drivers/usb/dwc3/core.h | 4 +-
drivers/usb/dwc3/ep0.c | 2 +-
drivers/usb/dwc3/gadget.c | 160 +++++++++++++++++++++++++-------------
3 files changed, 109 insertions(+), 57 deletions(-)
base-commit: bdf12cde30830d46a8ef1ba93986356f1164b4f1
--
2.53.0
next reply other threads:[~2026-10-21 0:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 0:37 Thinh Nguyen [this message]
2026-10-21 0:37 ` [PATCH 1/7] usb: dwc3: gadget: Reject requests to a disabled endpoint Thinh Nguyen
2026-10-21 0:44 ` sashiko-bot
2026-10-21 0:37 ` [PATCH 2/7] usb: dwc3: gadget: Track a timed out End Transfer Thinh Nguyen
2026-10-21 0:43 ` sashiko-bot
2026-10-21 0:38 ` [PATCH 3/7] usb: dwc3: gadget: Clear delayed stop on End Transfer completion Thinh Nguyen
2026-10-21 0:58 ` sashiko-bot
2026-10-21 0:38 ` [PATCH 4/7] usb: dwc3: gadget: Issue no-op Start Transfer only for stream endpoints Thinh Nguyen
2026-10-21 0:48 ` sashiko-bot
2026-10-21 0:38 ` [PATCH 5/7] usb: dwc3: gadget: Wait for End Transfer completion on ep disable Thinh Nguyen
2026-10-21 1:13 ` sashiko-bot
2026-10-21 0:38 ` [PATCH 6/7] usb: dwc3: gadget: Reset endpoint flags on controller start Thinh Nguyen
2026-10-21 1:03 ` sashiko-bot
2026-10-21 0:38 ` [PATCH 7/7] usb: dwc3: gadget: Recover from End Transfer timeout Thinh Nguyen
2026-10-21 1:05 ` sashiko-bot
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=cover.1792542945.git.Thinh.Nguyen@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=Tejas.Joglekar@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=mgr@kernel.org \
--cc=quic_wcheng@quicinc.com \
--cc=selvarasu.g@samsung.com \
--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