aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-res.c
diff options
context:
space:
mode:
authorWei Yang <weiyang@linux.vnet.ibm.com>2015-07-29 16:52:58 +0800
committerBjorn Helgaas <bhelgaas@google.com>2015-09-14 10:34:17 -0500
commit70675e0b6a1ae20f8e93f9fc083d28034ad38948 (patch)
tree8c4a3b6aae3923359680668ad98fcf18f43957fb /drivers/pci/setup-res.c
parentLinux 4.3-rc1 (diff)
downloadlinux-dev-70675e0b6a1ae20f8e93f9fc083d28034ad38948.tar.xz
linux-dev-70675e0b6a1ae20f8e93f9fc083d28034ad38948.zip
PCI: Don't try to restore VF BARs
VF BARs are read-only zero, so updating VF BARs will not have any effect. See the SR-IOV spec r1.1, sec 3.4.1.11. Don't update VF BARs in pci_restore_bars(). This avoids spurious "BAR %d: error updating" messages that we see when doing vfio pass-through after 6eb7018705de ("vfio-pci: Move idle devices to D3hot power state"). [bhelgaas: changelog, fix whitespace] Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r--drivers/pci/setup-res.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 232f9254c11a..152de5cd1cfc 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -36,6 +36,11 @@ void pci_update_resource(struct pci_dev *dev, int resno)
enum pci_bar_type type;
struct resource *res = dev->resource + resno;
+ if (dev->is_virtfn) {
+ dev_warn(&dev->dev, "can't update VF BAR%d\n", resno);
+ return;
+ }
+
/*
* Ignore resources for unimplemented BARs and unused resource slots
* for 64 bit BARs.