All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: pcs: xpcs-plat: fix runtime PM initialization
@ 2026-07-04 21:48 Coia Prant
  2026-07-21  0:24 ` Jakub Kicinski
  0 siblings, 1 reply; 6+ messages in thread
From: Coia Prant @ 2026-07-04 21:48 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Serge Semin,
	linux-kernel, Coia Prant, stable

The driver calls `pm_runtime_set_active()` before runtime PM is enabled,
and before the clock is prepared and enabled.

This causes the clock to be unprepared/disabled later in the suspend
callback even though it was never prepared/enabled, resulting in warnings:

clk_csr already disabled
clk_csr already unprepared

Fix this by setting the initial runtime PM status to SUSPENDED instead
of ACTIVE.

The clock will be properly enabled when the device is first resumed
via runtime PM (e.g., during MDIO access).

Fixes: f6bb3e9d98c2 ("net: pcs: xpcs: Add Synopsys DW xPCS platform device driver")
Cc: stable@vger.kernel.org
Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
 drivers/net/pcs/pcs-xpcs-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcs/pcs-xpcs-plat.c b/drivers/net/pcs/pcs-xpcs-plat.c
index f4b1b8246ce96..fb80773379df5 100644
--- a/drivers/net/pcs/pcs-xpcs-plat.c
+++ b/drivers/net/pcs/pcs-xpcs-plat.c
@@ -285,7 +285,7 @@ static int xpcs_plat_init_clk(struct dw_xpcs_plat *pxpcs)
 		return dev_err_probe(dev, PTR_ERR(pxpcs->cclk),
 				     "Failed to get CSR clock\n");
 
-	pm_runtime_set_active(dev);
+	pm_runtime_set_suspended(dev);
 	ret = devm_pm_runtime_enable(dev);
 	if (ret) {
 		dev_err(dev, "Failed to enable runtime-PM\n");
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-21 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04 21:48 [PATCH] net: pcs: xpcs-plat: fix runtime PM initialization Coia Prant
2026-07-21  0:24 ` Jakub Kicinski
2026-07-21  1:53   ` Coia Prant
2026-07-21 13:49     ` Jakub Kicinski
2026-07-21 15:00       ` Maxime Chevallier
2026-07-21 18:39         ` Coia Prant

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.