Thread (6 messages) 6 messages, 2 authors, 2017-01-20

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

From: Yongji Xie <hidden>
Date: 2017-01-20 07:42:04
Also in: linuxppc-dev
Subsystem: pci subsystem, the rest · Maintainers: Bjorn Helgaas, Linus Torvalds

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 <redacted>
Reviewed-by: Gavin Shan <redacted>
---
 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 a881c0d..220c31e 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;
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help