PCI: Separate VF BAR updates from standard BAR updates
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Mar 2017 00:48:22 +0000 (00:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2017 11:43:36 +0000 (12:43 +0100)
commit6a5f3e664ac798b54448fc55e7e7c3a9fd1ee9d4
treeab3ac81b7d04a7bf3f2cf6e14e9ea1cbac04d86a
parent29d928785f5e76b5abfafe4a91cc1db4155cd677
PCI: Separate VF BAR updates from standard BAR updates

[ Upstream commit 6ffa2489c51da77564a0881a73765ea2169f955d ]

Previously pci_update_resource() used the same code path for updating
standard BARs and VF BARs in SR-IOV capabilities.

Split the VF BAR update into a new pci_iov_update_resource() internal
interface, which makes it simpler to compute the BAR address (we can get
rid of pci_resource_bar() and pci_iov_resource_bar()).

This patch:

  - Renames pci_update_resource() to pci_std_update_resource(),
  - Adds pci_iov_update_resource(),
  - Makes pci_update_resource() a wrapper that calls the appropriate one,

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/iov.c
drivers/pci/pci.h
drivers/pci/setup-res.c