From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Liu Jiazi <jiazi.liu1984@gmail.com>
Cc: kernel test robot <lkp@intel.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"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>,
Jiazi Liu <liujiazi@amazon.com>
Subject: Re: [PATCH 1/1] usb: dwc3: gadget: fix IRQ storm on invalid event buffer count
Date: Fri, 7 Aug 2026 23:09:42 +0000 [thread overview]
Message-ID: <anZYnWfDlNPRQBq3@vbox> (raw)
In-Reply-To: <CAAcjFgibrFJYKYp1Q-ig6hHE_WCg5KSSZV2Fvv0zawswEdHZEQ@mail.gmail.com>
Hi Liu Jiazi,
On Fri, Aug 07, 2026, Liu Jiazi wrote:
> Hi @Thinh.Nguyen@synopsys.com
>
> Thanks for the review suggestions. I've updated the patch accordingly.
> On thing I'd like to discuss: in dwc3_err_recovery_work(), after
> soft_disconnect succeeds, should we attempt soft_connect to
> recover the controller, or just leave it disconnected and let the
> upper layer (e.g. function driver like ADB) handle reconnection
> on its own?
But what would trigger the usb core to reconnect?
>
> In my testing, calling soft_connect after soft_disconnect triggers an
Can you confirm where exactly the RCU stall happens? Did you add
synchronize_irq() before the soft_connect?
> RCU stall. Simply doing soft_disconnect and notifying the
> gadget driver via dwc3_disconnect_gadget_sleepable() is sufficient —
> ADB recovers on its own after that.
> What's your recommendation here?
>
> Brs
> Jiazi
>
Also, we may need to add a resuscitate counter and a "dying" state.
Before scheduling the dwc3_err_recovery_work(), increment the counter
and set the dying state. While in this state, the controller should
reject all gadget driver's requests.
If we fail to recover more than 3 times, stop doing soft_connect.
BR,
Thinh
prev parent reply other threads:[~2026-08-07 23:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 9:40 [PATCH 1/1] usb: dwc3: gadget: fix IRQ storm on invalid event buffer count Jiazi Liu
2026-08-04 23:04 ` Thinh Nguyen
2026-08-06 9:03 ` kernel test robot
2026-08-07 11:04 ` Liu Jiazi
2026-08-07 23:09 ` 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=anZYnWfDlNPRQBq3@vbox \
--to=thinh.nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiazi.liu1984@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liujiazi@amazon.com \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.