Skip to content

Commit 5cd39b6

Browse files
ayalevin123Saeed Mahameed
authored andcommitted
net/mlx5e: Fix error path of device attach
On failure to attach the netdev, fix the rollback by re-setting the device's state back to MLX5E_STATE_DESTROYING. Failing to attach doesn't stop statistics polling via .ndo_get_stats64. In this case, although the device is not attached, it falsely continues to query the firmware for counters. Setting the device's state back to MLX5E_STATE_DESTROYING prevents the firmware counters query. Fixes: 26e59d8 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks") Signed-off-by: Aya Levin <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 59f8f7c commit 5cd39b6

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5390,6 +5390,8 @@ int mlx5e_attach_netdev(struct mlx5e_priv *priv)
53905390
profile->cleanup_tx(priv);
53915391

53925392
out:
5393+
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
5394+
cancel_work_sync(&priv->update_stats_work);
53935395
return err;
53945396
}
53955397

0 commit comments

Comments
 (0)