Skip to content

Commit

Permalink
PCI: mvebu: Fix I/O space end address calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Petazzoni authored and Lorenzo Pieralisi committed Aug 8, 2018
1 parent 6554f95 commit dfd0309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/controller/pci-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
pcie->realio.start = PCIBIOS_MIN_IO;
pcie->realio.end = min_t(resource_size_t,
IO_SPACE_LIMIT,
resource_size(&pcie->io));
resource_size(&pcie->io) - 1);
} else
pcie->realio = pcie->io;

Expand Down

0 comments on commit dfd0309

Please sign in to comment.