summaryrefslogtreecommitdiffstats
path: root/drivers/pci/iov.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-09-23 23:10:15 +0200
committerBjorn Helgaas <bhelgaas@google.com>2019-09-23 23:10:15 +0200
commit0ca0ef1042f49c4b457ca6cb48ebb5d1c0bcf003 (patch)
tree46e72f809ff4157dc75368c7c22185c5af030d63 /drivers/pci/iov.c
parentMerge branch 'pci/pciehp' (diff)
parentPCI: Correct pci=resource_alignment parameter example (diff)
downloadlinux-0ca0ef1042f49c4b457ca6cb48ebb5d1c0bcf003.tar.xz
linux-0ca0ef1042f49c4b457ca6cb48ebb5d1c0bcf003.zip
Merge branch 'pci/resource'
- Convert pci_resource_to_user() to a weak function to remove HAVE_ARCH_PCI_RESOURCE_TO_USER #defines (Denis Efremov) - Use PCI_SRIOV_NUM_BARS for idiomatic loop structure (Denis Efremov) - Fix Resizable BAR size suspend/restore for 1MB BARs (Sumit Saxena) - Correct "pci=resource_alignment" example in documentation (Alexey Kardashevskiy) * pci/resource: PCI: Correct pci=resource_alignment parameter example PCI: Restore Resizable BAR size bits correctly for 1MB BARs PCI: Use PCI_SRIOV_NUM_BARS in loops instead of PCI_IOV_RESOURCE_END PCI: Convert pci_resource_to_user() to a weak function # Conflicts: # drivers/pci/pci.c
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r--drivers/pci/iov.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 617dccebccf5..b3f972e8cfed 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -724,8 +724,8 @@ static void sriov_restore_state(struct pci_dev *dev)
ctrl |= iov->ctrl & PCI_SRIOV_CTRL_ARI;
pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, ctrl);
- for (i = PCI_IOV_RESOURCES; i <= PCI_IOV_RESOURCE_END; i++)
- pci_update_resource(dev, i);
+ for (i = 0; i < PCI_SRIOV_NUM_BARS; i++)
+ pci_update_resource(dev, i + PCI_IOV_RESOURCES);
pci_write_config_dword(dev, iov->pos + PCI_SRIOV_SYS_PGSIZE, iov->pgsz);
pci_iov_set_numvfs(dev, iov->num_VFs);