diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-11-28 23:51:19 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-11-30 01:05:09 +0100 |
commit | 286c2378aaccc7343ebf17ec6cd86567659caf70 (patch) | |
tree | 5dd94f0ec77397ace66536e162c9e8be74d3768d /drivers/pci/iov.c | |
parent | PCI: Don't update VF BARs while VF memory space is enabled (diff) | |
download | linux-286c2378aaccc7343ebf17ec6cd86567659caf70.tar.xz linux-286c2378aaccc7343ebf17ec6cd86567659caf70.zip |
PCI: Remove pci_resource_bar() and pci_iov_resource_bar()
pci_std_update_resource() only deals with standard BARs, so we don't have
to worry about the complications of VF BARs in an SR-IOV capability.
Compute the BAR address inline and remove pci_resource_bar(). That makes
pci_iov_resource_bar() unused, so remove that as well.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r-- | drivers/pci/iov.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 2480b3879182..47227820406d 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -554,24 +554,6 @@ void pci_iov_release(struct pci_dev *dev) } /** - * pci_iov_resource_bar - get position of the SR-IOV BAR - * @dev: the PCI device - * @resno: the resource number - * - * Returns position of the BAR encapsulated in the SR-IOV capability. - */ -int pci_iov_resource_bar(struct pci_dev *dev, int resno) -{ - if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END) - return 0; - - BUG_ON(!dev->is_physfn); - - return dev->sriov->pos + PCI_SRIOV_BAR + - 4 * (resno - PCI_IOV_RESOURCES); -} - -/** * pci_iov_update_resource - update a VF BAR * @dev: the PCI device * @resno: the resource number |