net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
authorEli Cohen <eli@mellanox.com>
Mon, 16 Jul 2018 08:49:27 +0000 (11:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Aug 2018 14:20:48 +0000 (16:20 +0200)
commita766ccbf1d29db4f3a793131c2e986287757107c
tree1d15f6c851e7e13d27a8c8f4662dc7bc7e6b3485
parente0638b6a054cef5ad820f7380ff59463c6519b57
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager

[ Upstream commit 5f5991f36dce1e69dd8bd7495763eec2e28f08e7 ]

Execute mlx5_eswitch_init() only if we have MLX5_ESWITCH_MANAGER
capabilities.
Do the same for mlx5_eswitch_cleanup().

Fixes: a9f7705ffd66 ("net/mlx5: Unify vport manager capability check")
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c