From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com,
prabhakar.mahadev-lad.rj@bp.renesas.com,
kuninori.morimoto.gx@renesas.com, geert+renesas@glider.be,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 2/4] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume
Date: Thu, 6 Nov 2025 16:59:02 +0200 [thread overview]
Message-ID: <64c74f86-7438-49da-b164-a8a113e47c32@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdWDGpqdhCsA0MJqoL1JAiyVR-TA2YqDe+-S9Xf6c5O-gA@mail.gmail.com>
Hi, Geert,
On 11/6/25 16:52, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Thu, 6 Nov 2025 at 15:36, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> The Renesas RZ/G3S SoC supports a power-saving mode in which power to most
>> of the SoC components is turned off, including the USB blocks. On the
>> resume path, the reset signal must be de-asserted before applying any
>> settings to the USB registers. To handle this properly, call
>> reset_control_assert() and reset_control_deassert() during suspend and
>> resume, respectively.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
>> --- a/drivers/usb/host/ehci-platform.c
>> +++ b/drivers/usb/host/ehci-platform.c
>> @@ -454,6 +454,17 @@ static int __maybe_unused ehci_platform_suspend(struct device *dev)
>> if (pdata->power_suspend)
>> pdata->power_suspend(pdev);
>>
>> + ret = reset_control_assert(priv->rsts);
>> + if (ret) {
>> + if (pdata->power_on)
>> + pdata->power_on(pdev);
>> +
>> + ehci_resume(hcd, false);
>> +
>> + if (priv->quirk_poll)
>> + quirk_poll_init(priv);
>
> I have my doubts about the effectiveness of this "reverse error
> handling". If the reset_control_assert() failed, what are the chances
> that the device will actually work after trying to bring it up again?
>
> Same comment for next patch.
I wasn't sure if I should do this revert or not. In my mind, if the reset
assert fails, the reset signal is still de-asserted.
Thank you,
Claudiu
>
>> + }
>> +
>> return ret;
>> }
>>
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-11-06 14:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 14:36 [PATCH 0/4] usb: host: renesas: Handle reset signals " Claudiu
2025-11-06 14:36 ` [PATCH 1/4] usb: host: Do not check priv->clks[clk] Claudiu
2025-11-06 14:45 ` Geert Uytterhoeven
2025-11-06 15:06 ` Alan Stern
2025-11-06 14:36 ` [PATCH 2/4] usb: host: ehci-platform: Call reset assert/deassert on suspend/resume Claudiu
2025-11-06 14:52 ` Geert Uytterhoeven
2025-11-06 14:59 ` Claudiu Beznea [this message]
2025-11-07 8:01 ` Geert Uytterhoeven
2025-11-07 10:26 ` Claudiu Beznea
2025-11-10 9:29 ` Geert Uytterhoeven
2025-11-10 14:46 ` Alan Stern
2025-11-06 14:36 ` [PATCH 3/4] usb: host: ohci-platform: " Claudiu
2025-11-06 14:54 ` Geert Uytterhoeven
2025-11-06 14:36 ` [PATCH 4/4] usb: renesas_usbhs: Assert/de-assert reset signals " Claudiu
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=64c74f86-7438-49da-b164-a8a113e47c32@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=stern@rowland.harvard.edu \
--cc=yoshihiro.shimoda.uh@renesas.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
all inboxes | Powered by JetHome®