Skip to content

Commit ea629d8

Browse files
Yongji Xiebjorn-helgaas
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Gavin Shan <[email protected]>
1 parent 76dc526 commit ea629d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5084,7 +5084,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
50845084
command &= ~PCI_COMMAND_MEMORY;
50855085
pci_write_config_word(dev, PCI_COMMAND, command);
50865086

5087-
for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
5087+
for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
50885088
r = &dev->resource[i];
50895089
if (!(r->flags & IORESOURCE_MEM))
50905090
continue;

0 commit comments

Comments
 (0)