summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorMinghuan Lian <Minghuan.Lian@freescale.com>2014-09-23 14:28:57 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:37:06 (GMT)
commit12123b0fb0ec880fdd2f1e088d3139a101933593 (patch)
tree87a3495c64a7af0609574fd7123136822eafb474 /drivers/pci
parentb1d0632015abedc155c4e91583ec465048f4dd98 (diff)
downloadlinux-fsl-qoriq-12123b0fb0ec880fdd2f1e088d3139a101933593.tar.xz
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> The patch comes from: https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?h=next&id=0c61ea77cceafd1134225099961c2df0866b500f Change-Id: I1c820af498f99bca3ea235f297182a6620fa7ee1 Reviewed-on: http://git.am.freescale.net:8181/19708 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.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 4aa8146..5c56eea 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -453,7 +453,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;