]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Allow 0 for total host VFs
authorDaniel Jurgens <danielj@nvidia.com>
Mon, 10 Jul 2023 21:28:10 +0000 (00:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:32:28 +0000 (18:32 +0200)
commit4321bbc16fee96f30794926e87d5d5434a38a963
treeaa5ad227481f4fef3c5d1c1cc1117dbb9117bb5e
parentc256f96535bd3a7228c57c663ae1bac1b542f315
net/mlx5: Allow 0 for total host VFs

commit 2dc2b3922d3c0f52d3a792d15dcacfbc4cc76b8f upstream.

When querying eswitch functions 0 is a valid number of host VFs. After
introducing ARM SRIOV falling through to getting the max value from PCI
results in using the total VFs allowed on the ARM for the host.

Fixes: 86eec50beaf3 ("net/mlx5: Support querying max VFs from device");
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/sriov.c