Skip to content

Commit

Permalink
PCI: designware: Fix IO resource end address calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Minghuan Lian authored and Bjorn Helgaas committed Sep 24, 2014
1 parent ec98e9a commit 0c61ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/host/pcie-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c61ea7

Please sign in to comment.