[RFC PATCH v7 1/3] PCI: Ignore requested alignment for IOV BARs

Yongji Xie xyjxie at linux.vnet.ibm.com
Wed Oct 26 17:53:31 AEDT 2016


We would call pci_reassigndev_resource_alignment() before
pci_init_capabilities(). So the requested alignment would
never work for IOV BARs. And it's also meaningless to do
so.

Signed-off-by: Yongji Xie <xyjxie at linux.vnet.ibm.com>
---
 drivers/pci/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index ba34907..9a30832 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -5118,7 +5118,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;
-- 
1.7.9.5



More information about the Linuxppc-dev mailing list