Commit 0b136454 authored by Eli Cohen's avatar Eli Cohen Committed by Saeed Mahameed

net/mlx5: Clear LAG notifier pointer after unregister

After returning from unregister_netdevice_notifier_dev_net(), set the
notifier_call field to NULL so successive call to mlx5_lag_add() will
function as expected.

Fixes: 7907f23a ("net/mlx5: Implement RoCE LAG feature")
Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
Reviewed-by: default avatarVlad Buslov <vladbu@mellanox.com>
Reviewed-by: default avatarRaed Salem <raeds@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 404402ab
......@@ -615,8 +615,10 @@ void mlx5_lag_remove(struct mlx5_core_dev *dev)
break;
if (i == MLX5_MAX_PORTS) {
if (ldev->nb.notifier_call)
if (ldev->nb.notifier_call) {
unregister_netdevice_notifier_net(&init_net, &ldev->nb);
ldev->nb.notifier_call = NULL;
}
mlx5_lag_mp_cleanup(ldev);
cancel_delayed_work_sync(&ldev->bond_work);
mlx5_lag_dev_free(ldev);
......
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