From 0c61ea77cceafd1134225099961c2df0866b500f Mon Sep 17 00:00:00 2001 From: Minghuan Lian Date: Tue, 23 Sep 2014 22:28:57 +0800 Subject: [PATCH] PCI: designware: Fix IO resource end address calculation End address should be equal to start_addr + size - 1. Fix PCI IO resource end address calculation. Signed-off-by: Minghuan Lian Signed-off-by: Bjorn Helgaas Acked-by: Mohit KUMAR --- 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 b0dd2606edee..4d7cbd2975a5 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -454,7 +454,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; -- 2.34.1