forked from Minki/linux
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: 7907f23adc
("net/mlx5: Implement RoCE LAG feature")
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Raed Salem <raeds@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
404402abd5
commit
0b13645474
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user