Skip to contentSkip to conversation

mlxbf_gige: stop PHY during open() error paths

PATCH Applied David Thompson 4 participants 4 messages Mar 20, 2024 – Mar 25, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mlxbf_gige: stop PHY during open() error paths

The mlxbf_gige_open() routine starts the PHY as part of normal initialization. The mlxbf_gige_open() routine must stop the PHY during its error paths.

Fixes f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
---
 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +4 -1
index 3d09fa54598f..cef0e2d3f1a7 100644
@@ -157,7 +157,7 @@ static int mlxbf_gige_open(struct net_device *netdev)
 
 	err = mlxbf_gige_tx_init(priv);
 	if (err)
-		goto free_irqs;
+		goto phy_deinit;
 	err = mlxbf_gige_rx_init(priv);
 	if (err)
 		goto tx_deinit;
@@ -185,6 +185,9 @@ static int mlxbf_gige_open(struct net_device *netdev)
 tx_deinit:
 	mlxbf_gige_tx_deinit(priv);
 
+phy_deinit:
+	phy_stop(phydev);
+
 free_irqs:
 	mlxbf_gige_free_irqs(priv);
 	return err;
Signature · 1 line
2.30.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to David Thompson
Quoted 7 lines · Wed, Mar 20, 2024 at 08:31:17PM CET, [email protected] wrote:

The mlxbf_gige_open() routine starts the PHY as part of normal initialization. The mlxbf_gige_open() routine must stop the PHY during its error paths.

Fixes f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
#3 lore raw
In reply to David Thompson
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Wed, 20 Mar 2024 15:31:17 -0400 you wrote:

The mlxbf_gige_open() routine starts the PHY as part of normal initialization. The mlxbf_gige_open() routine must stop the PHY during its error paths.

Fixes f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")

[...]

Here is the summary with links:
- [net,v1] mlxbf_gige: stop PHY during open() error paths

    https://git.kernel.org/netdev/net/c/d6c30c5a168f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html