Commit d6c30c5a authored by David Thompson's avatar David Thompson Committed by David S. Miller

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: f92e1869 ("Add Mellanox BlueField Gigabit Ethernet driver")
Signed-off-by: default avatarDavid Thompson <davthompson@nvidia.com>
Reviewed-by: default avatarAsmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c04f7dfe
...@@ -157,7 +157,7 @@ static int mlxbf_gige_open(struct net_device *netdev) ...@@ -157,7 +157,7 @@ static int mlxbf_gige_open(struct net_device *netdev)
err = mlxbf_gige_tx_init(priv); err = mlxbf_gige_tx_init(priv);
if (err) if (err)
goto free_irqs; goto phy_deinit;
err = mlxbf_gige_rx_init(priv); err = mlxbf_gige_rx_init(priv);
if (err) if (err)
goto tx_deinit; goto tx_deinit;
...@@ -185,6 +185,9 @@ static int mlxbf_gige_open(struct net_device *netdev) ...@@ -185,6 +185,9 @@ static int mlxbf_gige_open(struct net_device *netdev)
tx_deinit: tx_deinit:
mlxbf_gige_tx_deinit(priv); mlxbf_gige_tx_deinit(priv);
phy_deinit:
phy_stop(phydev);
free_irqs: free_irqs:
mlxbf_gige_free_irqs(priv); mlxbf_gige_free_irqs(priv);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment