Skip to content

Commit dfd0309

Browse files
tpetazzoniLorenzo Pieralisi
authored andcommitted
PCI: mvebu: Fix I/O space end address calculation
pcie->realio.end should be the address of last byte of the area, therefore using resource_size() of another resource is not correct, we must substract 1 to get the address of the last byte. Fixes: 11be654 ("PCI: mvebu: Adapt to the new device tree layout") Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 parent 6554f95 commit dfd0309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pci-mvebu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
12191219
pcie->realio.start = PCIBIOS_MIN_IO;
12201220
pcie->realio.end = min_t(resource_size_t,
12211221
IO_SPACE_LIMIT,
1222-
resource_size(&pcie->io));
1222+
resource_size(&pcie->io) - 1);
12231223
} else
12241224
pcie->realio = pcie->io;
12251225

0 commit comments

Comments
 (0)