diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-09-13 09:12:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-17 15:01:46 +0200 |
commit | 85b47dc40bbc72ad68ff9d43bf750290b3c40c2b (patch) | |
tree | 25edc679f69c377d9a72f049818452f14862ab63 /drivers | |
parent | devlink: move linecard struct into linecard.c (diff) | |
download | linux-85b47dc40bbc72ad68ff9d43bf750290b3c40c2b.tar.xz linux-85b47dc40bbc72ad68ff9d43bf750290b3c40c2b.zip |
net/mlx5: Disable eswitch as the first thing in mlx5_unload()
The eswitch disable call does removal of all representors. Do that
before clearing the SF device table and maintain the same flow as during
SF devlink port removal, where the representor is removed before
the actual SF is removed.
Signed-off-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/mlx5/core/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 15561965d2af..d17c9c31b165 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1405,9 +1405,9 @@ err_irq_table: static void mlx5_unload(struct mlx5_core_dev *dev) { + mlx5_eswitch_disable(dev->priv.eswitch); mlx5_devlink_traps_unregister(priv_to_devlink(dev)); mlx5_sf_dev_table_destroy(dev); - mlx5_eswitch_disable(dev->priv.eswitch); mlx5_sriov_detach(dev); mlx5_lag_remove_mdev(dev); mlx5_ec_cleanup(dev); |