[PATCH] PCI: designware: Fix IO resource end address calculation

Mohit KUMAR DCG Mohit.KUMAR at st.com
Tue Sep 23 21:14:46 PDT 2014



> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas at google.com]
> Sent: Wednesday, September 24, 2014 4:24 AM
> To: Minghuan Lian
> Cc: linux-pci at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Zang
> Roy-R61911; Hu Mingkai-B21284; Scott Wood; Yoder Stuart-B08248; Arnd
> Bergmann; Mohit KUMAR DCG; Jingoo Han
> Subject: Re: [PATCH] PCI: designware: Fix IO resource end address
> calculation
> 
> [+cc Mohit, Jingoo]
> 
> On Tue, Sep 23, 2014 at 10:28:57PM +0800, Minghuan Lian wrote:
> > End address should be equal to start_addr + size - 1.
> > The patch fixes PCI IO resource end address calculation.
> >
> > Signed-off-by: Minghuan Lian <Minghuan.Lian at freescale.com>
> > ---
> >  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 0f3cb2a..c19184f7 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -459,7 +459,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;
> > --
> > 1.9.1
> >
- Acked-by: Mohit KUMAR <mohit.kumar at st.com>

Thanks
Mohit



More information about the linux-arm-kernel mailing list