summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
diff options
context:
space:
mode:
authorRoi Dayan <roid@nvidia.com>2023-03-23 11:01:38 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-05-19 20:50:29 +0300
commit2abe501751ed8dbd390be5c2f8d51125e3662814 (patch)
tree464bcb7c446b8725a216b68228c0693307092bd5 /drivers/net/ethernet/mellanox/mlx5/core/sriov.c
parentc511822fe2c96478d86b6bc3404bb45ebad7556b (diff)
downloadlinux-2abe501751ed8dbd390be5c2f8d51125e3662814.tar.xz
net/mlx5: E-Switch, Remove redundant check
The call to mlx5_eswitch_enable() also does the same check and if E-Switch not supported it returns 0 without any change. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/sriov.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/sriov.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
index 20d7662c10fb..f07d00929162 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
@@ -74,9 +74,6 @@ static int mlx5_device_enable_sriov(struct mlx5_core_dev *dev, int num_vfs)
struct mlx5_core_sriov *sriov = &dev->priv.sriov;
int err, vf, num_msix_count;
- if (!MLX5_ESWITCH_MANAGER(dev))
- goto enable_vfs_hca;
-
err = mlx5_eswitch_enable(dev->priv.eswitch, num_vfs);
if (err) {
mlx5_core_warn(dev,
@@ -84,7 +81,6 @@ static int mlx5_device_enable_sriov(struct mlx5_core_dev *dev, int num_vfs)
return err;
}
-enable_vfs_hca:
num_msix_count = mlx5_get_default_msix_vec_count(dev, num_vfs);
for (vf = 0; vf < num_vfs; vf++) {
/* Notify the VF before its enablement to let it set