Skip to content

Commit 8e7e2e8

Browse files
rleonSaeed Mahameed
authored andcommitted
net/mlx5: Remove all auxiliary devices at the unregister event
The call to mlx5_unregister_device() means that mlx5_core driver is removed. In such scenario, we need to disregard all other flags like attach/detach and forcibly remove all auxiliary devices. Fixes: a5ae8fc ("net/mlx5e: Don't create devices during unload flow") Tested-and-Reported-by: Yicong Yang <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 2f8b616 commit 8e7e2e8

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ int mlx5_register_device(struct mlx5_core_dev *dev)
397397
void mlx5_unregister_device(struct mlx5_core_dev *dev)
398398
{
399399
mutex_lock(&mlx5_intf_mutex);
400-
dev->priv.flags |= MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
400+
dev->priv.flags = MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV;
401401
mlx5_rescan_drivers_locked(dev);
402402
mutex_unlock(&mlx5_intf_mutex);
403403
}

0 commit comments

Comments
 (0)