summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWei Yang <weiyang@linux.vnet.ibm.com>2015-03-25 11:23:47 +0300
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-31 05:02:36 +0300
commit4449f079722c86d2f6925da039835acdd8e973a8 (patch)
tree52eafc1494e73fb9a1b630a50cd8b15f339cac78 /lib
parentf59dca27d20c73500c4a88ab9a077e40669755db (diff)
downloadlinux-4449f079722c86d2f6925da039835acdd8e973a8.tar.xz
PCI: Calculate maximum number of buses required for VFs
An SR-IOV device can change its First VF Offset and VF Stride based on the values of ARI Capable Hierarchy and NumVFs. The number of buses required for all VFs is determined by NumVFs, First VF Offset, and VF Stride (see SR-IOV spec r1.1, sec 2.1.2). Previously pci_iov_bus_range() computed how many buses would be required by TotalVFs, but this was based on a single NumVFs value and may not have been the maximum for all NumVFs configurations. Iterate over all valid NumVFs and calculate the maximum number of bus numbers that could ever be required for VFs of this device. [bhelgaas: changelog, compute busnr of NumVFs, not TotalVFs, remove kerenl-doc comment marker] Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions