* [net-next,PATCH 0/1] Fix pm_runtime for stmac_main
@ 2026-08-10 15:07 Christophe Roullier
2026-08-10 15:07 ` [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe Christophe Roullier
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Roullier @ 2026-08-10 15:07 UTC (permalink / raw)
To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
Maxime Chevallier, Vladimir Oltean, Christophe Roullier
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel
Fix an error during ethernet probe (deferred because IOExpander used for
Reset Ethernet of STM32MP13-DK is not ready).
The pb is the Ethernet probe initialize pm-runtime but when error occur
and exit from probe there is no deinit of pm-runtime so when the reprobe
is called (after init of IOExpander) pm-runtime is already enable and
the balance between "put" and "get" is not symmetric, so Ethernet genpd
is always active.
Already review on series pushed on :
18/02/2026 https://lkml.iu.edu/2602.2/02822.html,
and 04/08/2026 https://lkml.iu.edu/2608.0/08550.html
Christophe Roullier (1):
net: stmmac: Fix manage error case during stmmac_dvr_probe
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
1 file changed, 2 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe
2026-08-10 15:07 [net-next,PATCH 0/1] Fix pm_runtime for stmac_main Christophe Roullier
@ 2026-08-10 15:07 ` Christophe Roullier
2026-08-10 16:04 ` Breno Leitao
2026-08-10 16:31 ` Breno Leitao
0 siblings, 2 replies; 4+ messages in thread
From: Christophe Roullier @ 2026-08-10 15:07 UTC (permalink / raw)
To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
Maxime Chevallier, Vladimir Oltean, Christophe Roullier
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel
In case of error during stmmac_mdio_register, pm_runtime is not
cleaning before exit probe.
Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b2b7d0242dd3c..37d06fc6dba47 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -8080,6 +8080,8 @@ static int __stmmac_dvr_probe(struct device *device,
error_pcs_setup:
stmmac_mdio_unregister(ndev);
error_mdio_register:
+ pm_runtime_put_sync(device);
+ pm_runtime_disable(device);
stmmac_napi_del(ndev);
error_hw_init:
destroy_workqueue(priv->wq);
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe
2026-08-10 15:07 ` [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe Christophe Roullier
@ 2026-08-10 16:04 ` Breno Leitao
2026-08-10 16:31 ` Breno Leitao
1 sibling, 0 replies; 4+ messages in thread
From: Breno Leitao @ 2026-08-10 16:04 UTC (permalink / raw)
To: Christophe Roullier
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
Maxime Chevallier, Vladimir Oltean, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
On Mon, Aug 10, 2026 at 05:07:49PM +0200, Christophe Roullier wrote:
> In case of error during stmmac_mdio_register, pm_runtime is not
> cleaning before exit probe.
>
> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
> Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Breno Leitao <leitao@debian.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe
2026-08-10 15:07 ` [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe Christophe Roullier
2026-08-10 16:04 ` Breno Leitao
@ 2026-08-10 16:31 ` Breno Leitao
1 sibling, 0 replies; 4+ messages in thread
From: Breno Leitao @ 2026-08-10 16:31 UTC (permalink / raw)
To: Christophe Roullier
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
Maxime Chevallier, Vladimir Oltean, netdev, linux-stm32,
linux-arm-kernel, linux-kernel
On Mon, Aug 10, 2026 at 05:07:49PM +0200, Christophe Roullier wrote:
> In case of error during stmmac_mdio_register, pm_runtime is not
> cleaning before exit probe.
>
> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
> Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index b2b7d0242dd3c..37d06fc6dba47 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -8080,6 +8080,8 @@ static int __stmmac_dvr_probe(struct device *device,
> error_pcs_setup:
> stmmac_mdio_unregister(ndev);
> error_mdio_register:
> + pm_runtime_put_sync(device);
> + pm_runtime_disable(device);
Confirmed that pm_runtime_get_noresume() and pm_runtime_enabled() are
called before stmmac_mdio_register()
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-10 16:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 15:07 [net-next,PATCH 0/1] Fix pm_runtime for stmac_main Christophe Roullier
2026-08-10 15:07 ` [net-next,PATCH 1/1] net: stmmac: Fix manage error case during stmmac_dvr_probe Christophe Roullier
2026-08-10 16:04 ` Breno Leitao
2026-08-10 16:31 ` Breno Leitao
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.