From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
To: Stefan Wahren <wahrenst@gmx.net>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Douglas Anderson <dianders@chromium.org>,
Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
Amelie Delaunay <amelie.delaunay@foss.st.com>,
Jisheng Zhang <jszhang@kernel.org>,
"Felipe Balbi" <balbi@kernel.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<stable@vger.kernel.org>
Subject: Re: [PATCH v5 1/7] usb: dwc2: fix recovery after PM domain off
Date: Tue, 24 Nov 2026 11:52:06 +0100 [thread overview]
Message-ID: <7ffe72c6-6204-43ab-bfb7-5df87341ce7b@foss.st.com> (raw)
In-Reply-To: <af32cbc3-9c24-4e43-a7ca-f4716f48cb34@gmx.net>
On 11/21/26 21:38, Stefan Wahren wrote:
> Hi Fabrice,
>
> Am 17.11.26 um 18:06 schrieb Fabrice Gasnier:
>> When the power domain containing the DWC2 controller is disabled during
>> suspend, its registers are lost. Reading registers to back them up from
>> dwc2_suspend() after clock gating can hang STM32MP1 in both host and
>> device mode. Host suspend enters clock gating directly; in device mode,
>> this can happen if the host suspended the USB bus before system suspend.
Hi Stefan,
> sorry for breaking this platform, but I only had the Raspberry Pi for testing and I didn't get much
> feedback last year.
I saw your series, sorry about that, but unfortunately I haven't tested in time...
>
> I'm not familiar with STM32MP1, could you please clarify based on the compatible which is affected?
Yes, "st,stm32mp15-hsotg"
>
> Could you please explain, why backing up the registers before clock gating isn't an option?
Well, that can probably be an option, thanks on your suggestion!
That's not the way I had in mind (power gating and clock gating are two things).
This means: prepare for register loss each time the controller is put into clock gating mode (but
drop the backup values when exiting clock gating without PM-wide platform suspend, as these are
normally not lost).
I can rework this in V6:
- Add the registers backup call when entering clock gating. This will backup the registers when the
bus gets suspended (either as device or host), then a later PM suspend request can skip the backup,
if they are already backed-up.
- Remains some stale states, as raised by Sashiko: when doing this, most of state flags have to be
re-initialized. I'll try to split into separate patch to ease review.
Is it basically what you're thinking of ?
Best Regards,
Fabrice
>
> Best regards
next prev parent reply other threads:[~2026-11-24 10:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:06 [PATCH v5 0/7] usb: dwc2: fix low power issues found on stm32mp1 Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 1/7] usb: dwc2: fix recovery after PM domain off Fabrice Gasnier
2026-11-21 20:38 ` Stefan Wahren
2026-11-24 10:52 ` Fabrice Gasnier [this message]
2026-11-17 17:06 ` [PATCH v5 2/7] usb: dwc2: fix a possible interrupt storm in hcd resume Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 3/7] usb: dwc2: fix a possible interrupt storm on stm32mp1 Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 4/7] usb: dwc2: hcd: fix possible successive vbus supply enables Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 5/7] usb: dwc2: hcd: don't disable external vbus in system suspend Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 6/7] usb: dwc2: restore peripheral mode on low-level enable Fabrice Gasnier
2026-11-17 17:06 ` [PATCH v5 7/7] usb: dwc2: platform: fix stm32mp15 detection logic power management Fabrice Gasnier
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=7ffe72c6-6204-43ab-bfb7-5df87341ce7b@foss.st.com \
--to=fabrice.gasnier@foss.st.com \
--cc=Arthur.Petrosyan@synopsys.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=amelie.delaunay@foss.st.com \
--cc=balbi@kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jszhang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=wahrenst@gmx.net \
/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
all inboxes | Powered by JetHome®