]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API
authorParav Pandit <parav@mellanox.com>
Thu, 21 Mar 2019 22:51:30 +0000 (15:51 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Mar 2019 19:09:29 +0000 (12:09 -0700)
commit9a8511b38dc436c8545ceab55e7bf77177e0dd07
treed18df882cd12ce321bc3f643ce82d8a6afd1bb2c
parent91635cc56aabfe43b9919d333f920251b0a877b1
net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API

It is desired to get rid of num_vfs stored inside mlx5_core_sriov to
safely support vports more than vfs.
To reduce dependency on mlx5_core_sriov num_vfs, start using
pci_num_vf() from pci core.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/sriov.c