diff options
author | David Thompson <davthompson@nvidia.com> | 2024-03-20 15:31:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-25 11:05:21 +0000 |
commit | d6c30c5a168f8586b8bcc0d8e42e2456eb05209b (patch) | |
tree | c866dc457644191b5adbe4c2b1855c3804f49ac6 /drivers | |
parent | c04f7dfe6ec2a3a20a8578d5f67a436ae36e2a2a (diff) | |
download | linux-stable-d6c30c5a168f8586b8bcc0d8e42e2456eb05209b.tar.gz linux-stable-d6c30c5a168f8586b8bcc0d8e42e2456eb05209b.tar.bz2 linux-stable-d6c30c5a168f8586b8bcc0d8e42e2456eb05209b.zip |
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")
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c index 3d09fa54598f..cef0e2d3f1a7 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -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; |