[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <81b12279-e84d-4f81-b41c-0857c6a7975c@samsung.com>
Date: Thu, 7 Aug 2025 07:23:17 +0530
From: Selvarasu Ganesan <selvarasu.g@...sung.com>
To: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
Cc: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"m.grzeschik@...gutronix.de" <m.grzeschik@...gutronix.de>, "balbi@...com"
<balbi@...com>, "bigeasy@...utronix.de" <bigeasy@...utronix.de>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jh0801.jung@...sung.com" <jh0801.jung@...sung.com>, "dh10.jung@...sung.com"
<dh10.jung@...sung.com>, "akash.m5@...sung.com" <akash.m5@...sung.com>,
"hongpooh.kim@...sung.com" <hongpooh.kim@...sung.com>,
"eomji.oh@...sung.com" <eomji.oh@...sung.com>, "shijie.cai@...sung.com"
<shijie.cai@...sung.com>, "alim.akhtar@...sung.com"
<alim.akhtar@...sung.com>, "muhammed.ali@...sung.com"
<muhammed.ali@...sung.com>, "thiagu.r@...sung.com" <thiagu.r@...sung.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Remove WARN_ON for device endpoint command
timeouts
On 8/7/2025 6:26 AM, Thinh Nguyen wrote:
> 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@...sung.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@...r.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.
Hi Thinh,
Thanks for the confirmation.
Please review the updated patchset v2:
https://lore.kernel.org/all/20250807014639.1596-1-selvarasu.g@samsung.com/
Thanks,
Selva
>
> BR,
> Thinh
Powered by blists - more mailing lists