[PATCH v3 1/6] PCI: designware: remove wrong io_base assignment
From: Stanimir Varbanov <hidden>
Date: 2015-11-23 16:24:01
Also in:
linux-arm-msm, linux-devicetree, linux-pci, lkml
On 11/23/2015 12:27 PM, Gabriele Paoloni wrote:
Hi Stanimir, Many Thanks for this fixquoted
-----Original Message----- From: linux-kernel-owner at vger.kernel.org [mailto:linux-kernel- owner at vger.kernel.org] On Behalf Of Arnd Bergmann Sent: 23 November 2015 10:00 To: Stanimir Varbanov Cc: linux-arm-msm at vger.kernel.org; linux-kernel at vger.kernel.org; linux-arm- kernel at lists.infradead.org; devicetree at vger.kernel.org; linux- pci at vger.kernel.org; Bjorn Helgaas; Srinivas Kandagatla; Rob Herring; Rob Herring; Mark Rutland; Pawel Moll; Ian Campbell; Jingoo Han; Pratyush Anand; Bjorn Andersson Subject: Re: [PATCH v3 1/6] PCI: designware: remove wrong io_base assignment On Monday 23 November 2015 11:28:58 Stanimir Varbanov wrote:quoted
The io_base is used to keep the cpu physical address parsed from ranges dt property. After issue pci_remap_iospace the io_base has been assigned with io->start, which is not correct cause io->start is a PCI bus address. Signed-off-by: Stanimir Varbanov <redacted> --- drivers/pci/host/pcie-designware.c | 1 - 1 file changed, 1 deletion(-)diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.cquoted
index 540f077c37ea..02a7452bdf23 100644--- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c@@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp) ret, pp->io); continue; } - pp->io_base = pp->io->start; break; case IORESOURCE_MEM: pp->mem = win->res;I was surprised to see such an obvious bug here, as we had spent a lot of time trying to get it right. However, it broke only recently and it's worth mentioning what commit did it, soLooking at "[PATCH v12 0/8] PCI: hisi: Add PCIe host support for HiSilicon SoC Hip05": actually the bug came in as patch 3/6 of v11 patchset split [...] Change from v11: - Split 3/6 in v11 to 3/8, 4/8, 5/8 in v12. [...] This was not present in v11...sorry about this. Gabquoted
Fixes: 0021d22b73d6 ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT") Reviewed-by: Arnd Bergmann <arnd@arndb.de>
I think the bug is introduced in:
cbce7900598c ("PCI: designware: Make driver arch-agnostic")
cause the io_base is correctly calculated in 0021d22b73d6, do you agree?
--
regards,
Stan