* [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
@ 2026-02-06 17:19 Russell King (Oracle)
2026-02-07 14:23 ` Vadim Fedorenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2026-02-06 17:19 UTC (permalink / raw)
To: Andrew Lunn
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-arm-msm, linux-stm32,
Mohd Ayaan Anwar, netdev, Paolo Abeni, Sneh Shah, Vinod Koul
Add cleanup for failure paths in qcom_ethqos_serdes_powerup(). This
was missing calling phy_exit() and phy_power_off() at appropriate
failure points.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
.../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 869f924f3cde..af8204c0e188 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)
return ret;
ret = phy_power_on(ethqos->serdes_phy);
- if (ret)
+ if (ret) {
+ phy_exit(ethqos->serdes_phy);
return ret;
+ }
- return phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
+ ret = phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
+ if (ret) {
+ phy_power_off(ethqos->serdes_phy);
+ phy_exit(ethqos->serdes_phy);
+ }
+
+ return ret;
}
static void qcom_ethqos_serdes_powerdown(struct net_device *ndev, void *priv)
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
2026-02-06 17:19 [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup() Russell King (Oracle)
@ 2026-02-07 14:23 ` Vadim Fedorenko
2026-02-10 12:30 ` Mohd Ayaan Anwar
2026-02-11 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Vadim Fedorenko @ 2026-02-07 14:23 UTC (permalink / raw)
To: Russell King (Oracle), Andrew Lunn
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-arm-msm, linux-stm32,
Mohd Ayaan Anwar, netdev, Paolo Abeni, Sneh Shah, Vinod Koul
On 06/02/2026 17:19, Russell King (Oracle) wrote:
> Add cleanup for failure paths in qcom_ethqos_serdes_powerup(). This
> was missing calling phy_exit() and phy_power_off() at appropriate
> failure points.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 869f924f3cde..af8204c0e188 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)
> return ret;
>
> ret = phy_power_on(ethqos->serdes_phy);
> - if (ret)
> + if (ret) {
> + phy_exit(ethqos->serdes_phy);
> return ret;
> + }
>
> - return phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
> + ret = phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
> + if (ret) {
> + phy_power_off(ethqos->serdes_phy);
> + phy_exit(ethqos->serdes_phy);
> + }
> +
> + return ret;
> }
>
> static void qcom_ethqos_serdes_powerdown(struct net_device *ndev, void *priv)
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
2026-02-06 17:19 [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup() Russell King (Oracle)
2026-02-07 14:23 ` Vadim Fedorenko
@ 2026-02-10 12:30 ` Mohd Ayaan Anwar
2026-02-11 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Mohd Ayaan Anwar @ 2026-02-10 12:30 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Alexandre Torgue, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, linux-arm-kernel, linux-arm-msm,
linux-stm32, netdev, Paolo Abeni, Sneh Shah, Vinod Koul
On Fri, Feb 06, 2026 at 05:19:21PM +0000, Russell King (Oracle) wrote:
> Add cleanup for failure paths in qcom_ethqos_serdes_powerup(). This
> was missing calling phy_exit() and phy_power_off() at appropriate
> failure points.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 869f924f3cde..af8204c0e188 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -659,10 +659,18 @@ static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)
> return ret;
>
> ret = phy_power_on(ethqos->serdes_phy);
> - if (ret)
> + if (ret) {
> + phy_exit(ethqos->serdes_phy);
> return ret;
> + }
>
> - return phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
> + ret = phy_set_speed(ethqos->serdes_phy, ethqos->serdes_speed);
> + if (ret) {
> + phy_power_off(ethqos->serdes_phy);
> + phy_exit(ethqos->serdes_phy);
> + }
> +
> + return ret;
> }
>
> static void qcom_ethqos_serdes_powerdown(struct net_device *ndev, void *priv)
> --
> 2.47.3
>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Ayaan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
2026-02-06 17:19 [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup() Russell King (Oracle)
2026-02-07 14:23 ` Vadim Fedorenko
2026-02-10 12:30 ` Mohd Ayaan Anwar
@ 2026-02-11 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-11 5:00 UTC (permalink / raw)
To: Russell King
Cc: andrew, alexandre.torgue, andrew+netdev, davem, edumazet, kuba,
linux-arm-kernel, linux-arm-msm, linux-stm32, mohd.anwar, netdev,
pabeni, quic_snehshah, vkoul
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 06 Feb 2026 17:19:21 +0000 you wrote:
> Add cleanup for failure paths in qcom_ethqos_serdes_powerup(). This
> was missing calling phy_exit() and phy_power_off() at appropriate
> failure points.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup()
https://git.kernel.org/netdev/net-next/c/3a4687366148
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-11 5:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 17:19 [PATCH net-next] net: stmmac: qcom-ethqos: fix qcom_ethqos_serdes_powerup() Russell King (Oracle)
2026-02-07 14:23 ` Vadim Fedorenko
2026-02-10 12:30 ` Mohd Ayaan Anwar
2026-02-11 5:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox