net/mlx5: Disable eswitch as the first thing in mlx5_unload()
authorJiri Pirko <jiri@nvidia.com>
Wed, 13 Sep 2023 07:12:33 +0000 (09:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Sep 2023 13:01:46 +0000 (14:01 +0100)
commit85b47dc40bbc72ad68ff9d43bf750290b3c40c2b
tree25edc679f69c377d9a72f049818452f14862ab63
parentd0b7e990f760ec9a614fbe5f89a5cede4335a7bb
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>
drivers/net/ethernet/mellanox/mlx5/core/main.c