summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoi Dayan <roid@nvidia.com>2023-04-23 13:39:57 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-05-19 10:50:31 -0700
commitf5d87b47a1d9dc14c048c84935397d97833ac706 (patch)
treeb512b3024c3ef47bdd61cf2e3f5638a1fceeb83d
parent0279b5454c0e8344f30fcac90db76cf17b6b76c7 (diff)
downloadlinux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.tar.gz
linux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.tar.bz2
linux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.zip
net/mlx5e: E-Switch, Initialize E-Switch for eswitch manager
Initialize eswitch instance for a function which is eswitch manager but not a vport group manager. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 9b71819e049a..31956cd9d1bb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1622,7 +1622,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
struct mlx5_eswitch *esw;
int err;
- if (!MLX5_VPORT_MANAGER(dev))
+ if (!MLX5_VPORT_MANAGER(dev) && !MLX5_ESWITCH_MANAGER(dev))
return 0;
esw = kzalloc(sizeof(*esw), GFP_KERNEL);
@@ -1692,7 +1692,7 @@ abort:
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
{
- if (!esw || !MLX5_VPORT_MANAGER(esw->dev))
+ if (!esw)
return;
esw_info(esw->dev, "cleanup\n");