Skip to content

Commit d6c30c5

Browse files
dthompsodavem330
authored andcommitted
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: f92e186 ("Add Mellanox BlueField Gigabit Ethernet driver") Signed-off-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c04f7df commit d6c30c5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int mlxbf_gige_open(struct net_device *netdev)
157157

158158
err = mlxbf_gige_tx_init(priv);
159159
if (err)
160-
goto free_irqs;
160+
goto phy_deinit;
161161
err = mlxbf_gige_rx_init(priv);
162162
if (err)
163163
goto tx_deinit;
@@ -185,6 +185,9 @@ static int mlxbf_gige_open(struct net_device *netdev)
185185
tx_deinit:
186186
mlxbf_gige_tx_deinit(priv);
187187

188+
phy_deinit:
189+
phy_stop(phydev);
190+
188191
free_irqs:
189192
mlxbf_gige_free_irqs(priv);
190193
return err;

0 commit comments

Comments
 (0)