]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: designware: Fix IO resource end address calculation
authorMinghuan Lian <Minghuan.Lian@freescale.com>
Tue, 23 Sep 2014 14:28:57 +0000 (22:28 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 24 Sep 2014 13:04:01 +0000 (07:04 -0600)
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>
drivers/pci/host/pcie-designware.c

index b0dd2606edeeb1dcd9d377f0101081ce599b0419..4d7cbd2975a56ab599cf33826a0e1a2e2db1097d 100644 (file)
@@ -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;