summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMinghuan Lian <Minghuan.Lian@freescale.com>2014-09-23 22:28:57 +0800
committerBjorn Helgaas <bhelgaas@google.com>2014-09-24 07:04:01 -0600
commit0c61ea77cceafd1134225099961c2df0866b500f (patch)
treea5a89f61c3243a8b404937b5e7eb425f32a98287 /drivers/pci
parentec98e9ab6f2475ff57c12d069e78b90548c0f60e (diff)
downloadlinux-stable-0c61ea77cceafd1134225099961c2df0866b500f.tar.gz
linux-stable-0c61ea77cceafd1134225099961c2df0866b500f.tar.bz2
linux-stable-0c61ea77cceafd1134225099961c2df0866b500f.zip
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 <Minghuan.Lian@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Mohit KUMAR <mohit.kumar@st.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pcie-designware.c2
1 files changed, 1 insertions, 1 deletions
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;