From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Udipto Goswami <udipto.goswami@oss.qualcomm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Frederic Weisbecker <frederic@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [RFC PATCH] usb: gadget: uvc: Prevent smmu fault in unstopped stream uvc teardown
Date: Fri, 9 Jan 2026 01:42:48 +0000 [thread overview]
Message-ID: <20260109014242.cmbdat6fvutl2uxk@synopsys.com> (raw)
In-Reply-To: <CAMTwNXAY5UEm6FEF=xD2m2s9PBOiLE-Btgii-L3kqiuiKbj2Tg@mail.gmail.com>
On Wed, Jan 07, 2026, Udipto Goswami wrote:
> On Tue, Jan 6, 2026 at 10:23 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> > Probably a disconnect causes the transfer to be cancelled immediately
> > rather than waiting around for it to finish by itself.
> let me get these details on what happens when composition switches and
> disconnects.
> Thanks for the suggestion above, let me try that out with streamoff.
>
> Thanks,
> -Udipto
>
This is probably related to this conversation:
https://lore.kernel.org/linux-usb/20251121022156.vbnheb6r2ytov7bt@synopsys.com/
The summary:
usb_ep_disable() is documented and expected to be in used interrupt
context, and the composite framework and some gadget drivers treat it
so. The dwc3 driver does not "wait" for the endpoints to be flushed
before giving back the usb requests.
The proper fix:
Change usb_ep_disable documentation back to allow to be used in process
context. Update the dwc3 to wait for the endpoint to be flushed before
completing usb_ep_disable. Audit the composite framework and gadget
drivers to not use usb_ep_disable in interrupt context.
BR,
Thinh
prev parent reply other threads:[~2026-01-09 1:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 5:07 [RFC PATCH] usb: gadget: uvc: Prevent smmu fault in unstopped stream uvc teardown Udipto Goswami
2026-01-05 8:51 ` Udipto Goswami
2026-01-05 9:45 ` Selvarasu Ganesan
2026-01-06 10:40 ` Udipto Goswami
2026-01-05 15:55 ` Alan Stern
2026-01-06 10:43 ` Udipto Goswami
2026-01-06 16:53 ` Alan Stern
2026-01-07 4:40 ` Udipto Goswami
2026-01-09 1:42 ` 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=20260109014242.cmbdat6fvutl2uxk@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=udipto.goswami@oss.qualcomm.com \
/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