From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Selvarasu Ganesan <selvarasu.g@samsung.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"m.grzeschik@pengutronix.de" <m.grzeschik@pengutronix.de>,
"balbi@ti.com" <balbi@ti.com>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jh0801.jung@samsung.com" <jh0801.jung@samsung.com>,
"dh10.jung@samsung.com" <dh10.jung@samsung.com>,
"akash.m5@samsung.com" <akash.m5@samsung.com>,
"hongpooh.kim@samsung.com" <hongpooh.kim@samsung.com>,
"eomji.oh@samsung.com" <eomji.oh@samsung.com>,
"shijie.cai@samsung.com" <shijie.cai@samsung.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"muhammed.ali@samsung.com" <muhammed.ali@samsung.com>,
"thiagu.r@samsung.com" <thiagu.r@samsung.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Remove WARN_ON for device endpoint command timeouts
Date: Thu, 7 Aug 2025 00:56:39 +0000 [thread overview]
Message-ID: <20250807005638.thhsgjn73aaov2af@synopsys.com> (raw)
In-Reply-To: <99fa41ed-dee0-499f-8827-67e1e1c70e60@samsung.com>
On Wed, Aug 06, 2025, Selvarasu Ganesan wrote:
>
> On 8/6/2025 5:08 AM, Thinh Nguyen wrote:
> > On Mon, Aug 04, 2025, Selvarasu Ganesan wrote:
> >> From: Akash M <akash.m5@samsung.com>
> >>
> >> This commit addresses a rarely observed endpoint command timeout
> >> which causes kernel panic due to warn when 'panic_on_warn' is enabled
> >> and unnecessary call trace prints when 'panic_on_warn' is disabled.
> >> It is seen during fast software-controlled connect/disconnect testcases.
> >> The following is one such endpoint command timeout that we observed:
> >>
> >> 1. Connect
> >> =======
> >> ->dwc3_thread_interrupt
> >> ->dwc3_ep0_interrupt
> >> ->configfs_composite_setup
> >> ->composite_setup
> >> ->usb_ep_queue
> >> ->dwc3_gadget_ep0_queue
> >> ->__dwc3_gadget_ep0_queue
> >> ->__dwc3_ep0_do_control_data
> >> ->dwc3_send_gadget_ep_cmd
> >>
> >> 2. Disconnect
> >> ==========
> >> ->dwc3_thread_interrupt
> >> ->dwc3_gadget_disconnect_interrupt
> >> ->dwc3_ep0_reset_state
> >> ->dwc3_ep0_end_control_data
> >> ->dwc3_send_gadget_ep_cmd
> >>
> >> In the issue scenario, in Exynos platforms, we observed that control
> >> transfers for the previous connect have not yet been completed and end
> >> transfer command sent as a part of the disconnect sequence and
> >> processing of USB_ENDPOINT_HALT feature request from the host timeout.
> >> This maybe an expected scenario since the controller is processing EP
> >> commands sent as a part of the previous connect. It maybe better to
> >> remove WARN_ON in all places where device endpoint commands are sent to
> >> avoid unnecessary kernel panic due to warn.
> >>
> >> Fixes: e192cc7b5239 ("usb: dwc3: gadget: move cmd_endtransfer to extra function")
> >> Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
> >> Fixes: c7fcdeb2627c ("usb: dwc3: ep0: simplify EP0 state machine")
> >> Fixes: f0f2b2a2db85 ("usb: dwc3: ep0: push ep0state into xfernotready processing")
> >> Fixes: 2e3db064855a ("usb: dwc3: ep0: drop XferNotReady(DATA) support")
> >> Cc: stable@vger.kernel.org
> > I don't think this is a fix patch. You're just replacing WARN* with
> > dev_warn* without doing any recovery. Let's remove the Fixes and table
> > tag. Also, can we replace dev_warn* with dev_err* because these are
> > critical errors that may put the controller in a bad state.
> >
> > Thanks,
> > Thinh
>
>
> Hi Thinh,
>
> Thanks for your review comments.
> Yeah we agree. This is not a fix patch. Sure we will update new patchset
> with replace dev_warn* with dev_err*.
>
> As for dropping the stable tag, It would be better these changes to be
> applied across all stable kernels, so shall we keep stable tag in place?
>
That's fine with me.
BR,
Thinh
next prev parent reply other threads:[~2025-08-07 0:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250804142356epcas5p3aa0566fb78e44a37467ac088aa387f5e@epcas5p3.samsung.com>
2025-08-04 14:22 ` [PATCH] usb: dwc3: Remove WARN_ON for device endpoint command timeouts Selvarasu Ganesan
2025-08-05 23:38 ` Thinh Nguyen
2025-08-06 4:44 ` Selvarasu Ganesan
2025-08-07 0:56 ` Thinh Nguyen [this message]
2025-08-07 1:53 ` Selvarasu Ganesan
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=20250807005638.thhsgjn73aaov2af@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=akash.m5@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=dh10.jung@samsung.com \
--cc=eomji.oh@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=hongpooh.kim@samsung.com \
--cc=jh0801.jung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=muhammed.ali@samsung.com \
--cc=selvarasu.g@samsung.com \
--cc=shijie.cai@samsung.com \
--cc=stable@vger.kernel.org \
--cc=thiagu.r@samsung.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