summaryrefslogtreecommitdiffstats
path: root/include/linux/pci_ids.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-05-25 08:18:34 -0500
committerBjorn Helgaas <bhelgaas@google.com>2018-05-25 08:18:34 -0500
commit8d85a7a4f2c935013a01964b7e81d5a105bd7a4c (patch)
tree1fd42346d152affb50867b9db38b523cacb2069f /include/linux/pci_ids.h
parentcef74409ea79b0a37af6889e7abf7a2a9c47979b (diff)
downloadblackbird-op-linux-8d85a7a4f2c935013a01964b7e81d5a105bd7a4c.tar.gz
blackbird-op-linux-8d85a7a4f2c935013a01964b7e81d5a105bd7a4c.zip
PCI/IOV: Allow PF drivers to limit total_VFs to 0
Some SR-IOV PF drivers implement .sriov_configure(), which allows user-space to enable VFs by writing the desired number of VFs to the sysfs "sriov_numvfs" file (see sriov_numvfs_store()). The PCI core limits the number of VFs to the TotalVFs advertised by the device in its SR-IOV capability. The PF driver can limit the number of VFs to even fewer (it may have pre-allocated data structures or knowledge of device limitations) by calling pci_sriov_set_totalvfs(), but previously it could not limit the VFs to 0. Change pci_sriov_get_totalvfs() so it always respects the VF limit imposed by the PF driver, even if the limit is 0. This sequence: pci_sriov_set_totalvfs(dev, 0); x = pci_sriov_get_totalvfs(dev); previously set "x" to TotalVFs from the SR-IOV capability. Now it will set "x" to 0. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> [bhelgaas: split to separate patch] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci_ids.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud