]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Simplify sriov enable/disable flow
authorParav Pandit <parav@mellanox.com>
Thu, 21 Mar 2019 22:51:28 +0000 (15:51 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Mar 2019 19:09:29 +0000 (12:09 -0700)
commit8fa8f13288510b89382f9abecb30167e8d3fe503
tree98201c0c76579bbb830826c6254e11651f8aa04b
parent225708e56c99310f3edc799cc6caeb48345ae9a3
net/mlx5: Simplify sriov enable/disable flow

Simplify sriov enable/disable flow for below two checks.

1. PCI core driver allows sriov configuration only on a PF.
This is done in drivers/pci/pci-sysfs.c sriov_attrs_are_visible().

2. PCI core driver allow sriov enablement if the sriov is currently
disabled for for a PF. This is done in drivers/pci/pci-sysfs.c
sriov_numvfs_store().

Hence there is no need for mlx5 driver to duplicate such checks.

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/sriov.c