Skip to content

Commit a766ccb

Browse files
Eli Cohengregkh
authored andcommitted
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
[ Upstream commit 5f5991f ] Execute mlx5_eswitch_init() only if we have MLX5_ESWITCH_MANAGER capabilities. Do the same for mlx5_eswitch_cleanup(). Fixes: a9f7705 ("net/mlx5: Unify vport manager capability check") Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e0638b6 commit a766ccb

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
16161616
int vport_num;
16171617
int err;
16181618

1619-
if (!MLX5_VPORT_MANAGER(dev))
1619+
if (!MLX5_ESWITCH_MANAGER(dev))
16201620
return 0;
16211621

16221622
esw_info(dev,
@@ -1689,7 +1689,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
16891689

16901690
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
16911691
{
1692-
if (!esw || !MLX5_VPORT_MANAGER(esw->dev))
1692+
if (!esw || !MLX5_ESWITCH_MANAGER(esw->dev))
16931693
return;
16941694

16951695
esw_info(esw->dev, "cleanup\n");

0 commit comments

Comments
 (0)