提交 dfd0309f 编写于 作者: T Thomas Petazzoni 提交者: Lorenzo Pieralisi

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: 11be6547 ("PCI: mvebu: Adapt to the new device tree layout")
Signed-off-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
上级 6554f950
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册