[PATCH] PCI: designware: Fix IO resource end address calculation
Minghuan Lian
Minghuan.Lian at freescale.com
Tue Sep 23 07:28:57 PDT 2014
End address should be equal to start_addr + size - 1.
The patch fixes PCI IO resource end address calculation.
Signed-off-by: Minghuan Lian <Minghuan.Lian at freescale.com>
---
drivers/pci/host/pcie-designware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 0f3cb2a..c19184f7 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -459,7 +459,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp)
pp->io.end = min_t(resource_size_t,
IO_SPACE_LIMIT,
range.pci_addr + range.size
- + global_io_offset);
+ + global_io_offset - 1);
pp->io_size = resource_size(&pp->io);
pp->io_bus_addr = range.pci_addr;
pp->io_base = range.cpu_addr;
--
1.9.1
More information about the linux-arm-kernel
mailing list