mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
mlxbf_gige: stop PHY during open() error paths
[ Upstream commit d6c30c5a168f8586b8bcc0d8e42e2456eb05209b ]
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: f92e1869d7 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b51ec7fc9f
commit
57beec623a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user