From: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: <linux-phy@lists.infradead.org>,
<linux-renesas-soc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: core: Reinstate pm_runtime_enabled() check in phy_pm_runtime_put()
Date: Tue, 30 Dec 2025 18:10:28 +0100 [thread overview]
Message-ID: <b90f706e-165d-43c3-8dcf-ba8a495fd2f8@intel.com> (raw)
In-Reply-To: <3ca9f8166d21685bfbf97535da30172f74822130.1767107014.git.geert+renesas@glider.be>
On 12/30/2025 4:04 PM, Geert Uytterhoeven wrote:
> On Koelsch (R-Car M2-W), during boot and s2ram:
>
> phy phy-e6590100.usb-phy-controller.0: Runtime PM usage count underflow!
>
> While phy_pm_runtime_get{,_sync}() and phy_pm_runtime_put_sync() still
> contain pm_runtime_enabled() checks, the same check in
> phy_pm_runtime_put() was deemed redundant and removed, causing count
> underflows with PHY drivers like drivers/phy/renesas/phy-rcar-gen2.c
> that do not use Runtime PM yet,
>
> Fix this by reinstating the check.
>
> Fixes: caad07ae07e3fb17 ("phy: core: Discard pm_runtime_put() return values")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/phy/phy-core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index 160ecb757d1d62a0..e2a2a99d069789c7 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -195,6 +195,9 @@ void phy_pm_runtime_put(struct phy *phy)
> if (!phy)
> return;
>
> + if (!pm_runtime_enabled(&phy->dev))
> + return;
> +
> pm_runtime_put(&phy->dev);
> }
> EXPORT_SYMBOL_GPL(phy_pm_runtime_put);
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-12-30 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 15:04 [PATCH] phy: core: Reinstate pm_runtime_enabled() check in phy_pm_runtime_put() Geert Uytterhoeven
2025-12-30 17:10 ` Wysocki, Rafael J [this message]
2026-01-01 11:08 ` Vinod Koul
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=b90f706e-165d-43c3-8dcf-ba8a495fd2f8@intel.com \
--to=rafael.j.wysocki@intel.com \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox