summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorYongji Xie <xyjxie@linux.vnet.ibm.com>2017-02-15 14:50:22 +0800
committerBjorn Helgaas <bhelgaas@google.com>2017-04-18 14:47:19 -0500
commitea629d873f3e140fb2e3181c30413e485ee9002b (patch)
tree6f3d4ddbc4ef06422b7944b5fe3e5a217fac4912 /drivers/pci
parent76dc52684d0f72971d9f6cc7d5ae198061b715bd (diff)
downloadlinux-ea629d873f3e140fb2e3181c30413e485ee9002b.tar.bz2
PCI: Ignore requested alignment for IOV BARs
We would call pci_reassigndev_resource_alignment() before pci_init_capabilities(). So the requested alignment would never work for IOV BARs. Furthermore, it's meaningless to request additional alignment for IOV BARs, the IOV BAR alignment is only determined by the VF BAR size. Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7904d02ffdb9..679af2a253ad 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5084,7 +5084,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
command &= ~PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, command);
- for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
+ for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
r = &dev->resource[i];
if (!(r->flags & IORESOURCE_MEM))
continue;