* [PATCH] PCI: imx: do not remap invalid res
@ 2021-11-01 18:02 Tim Harvey
2021-12-01 22:06 ` Tim Harvey
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tim Harvey @ 2021-11-01 18:02 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Rob Herring, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci
Cc: linux-kernel, Tim Harvey, Richard Zhu
On imx6 and perhaps others when pcie probes you get a:
imx6q-pcie 33800000.pcie: invalid resource
This occurs because the atu is not specified in the DT and as such it
should not be remapped.
Cc: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index a945f0c0e73d..3254f60d1713 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
if (!pci->atu_base) {
struct resource *res =
platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
- if (res)
+ if (res) {
pci->atu_size = resource_size(res);
- pci->atu_base = devm_ioremap_resource(dev, res);
- if (IS_ERR(pci->atu_base))
+ pci->atu_base = devm_ioremap_resource(dev, res);
+ }
+ if (!pci->atu_base || IS_ERR(pci->atu_base))
pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-11-01 18:02 [PATCH] PCI: imx: do not remap invalid res Tim Harvey
@ 2021-12-01 22:06 ` Tim Harvey
2021-12-02 0:48 ` Hongxing Zhu
2021-12-03 20:28 ` Bjorn Helgaas
2021-12-01 23:46 ` Rob Herring
2021-12-02 9:43 ` Lorenzo Pieralisi
2 siblings, 2 replies; 8+ messages in thread
From: Tim Harvey @ 2021-12-01 22:06 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Rob Herring, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci
Cc: open list, Richard Zhu
On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com> wrote:
>
> On imx6 and perhaps others when pcie probes you get a:
> imx6q-pcie 33800000.pcie: invalid resource
>
> This occurs because the atu is not specified in the DT and as such it
> should not be remapped.
>
> Cc: Richard Zhu <hongxing.zhu@nxp.com>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
> drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> index a945f0c0e73d..3254f60d1713 100644
> --- a/drivers/pci/controller/dwc/pcie-designware.c
> +++ b/drivers/pci/controller/dwc/pcie-designware.c
> @@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> if (!pci->atu_base) {
> struct resource *res =
> platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
> - if (res)
> + if (res) {
> pci->atu_size = resource_size(res);
> - pci->atu_base = devm_ioremap_resource(dev, res);
> - if (IS_ERR(pci->atu_base))
> + pci->atu_base = devm_ioremap_resource(dev, res);
> + }
> + if (!pci->atu_base || IS_ERR(pci->atu_base))
> pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
> }
>
> --
> 2.17.1
>
ping - any feedback on this?
Best regards,
Tim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-11-01 18:02 [PATCH] PCI: imx: do not remap invalid res Tim Harvey
2021-12-01 22:06 ` Tim Harvey
@ 2021-12-01 23:46 ` Rob Herring
2021-12-02 9:43 ` Lorenzo Pieralisi
2 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2021-12-01 23:46 UTC (permalink / raw)
To: Tim Harvey
Cc: Jingoo Han, Gustavo Pimentel, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci,
linux-kernel, Richard Zhu
On Mon, Nov 1, 2021 at 1:37 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> On imx6 and perhaps others when pcie probes you get a:
> imx6q-pcie 33800000.pcie: invalid resource
>
> This occurs because the atu is not specified in the DT and as such it
> should not be remapped.
>
Fixes: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows")
Reviewed-by: Rob Herring <robh@kernel.org>
> Cc: Richard Zhu <hongxing.zhu@nxp.com>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
> drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] PCI: imx: do not remap invalid res
2021-12-01 22:06 ` Tim Harvey
@ 2021-12-02 0:48 ` Hongxing Zhu
2021-12-02 2:41 ` Rob Herring
2021-12-03 20:28 ` Bjorn Helgaas
1 sibling, 1 reply; 8+ messages in thread
From: Hongxing Zhu @ 2021-12-02 0:48 UTC (permalink / raw)
To: tharvey, Jingoo Han, Gustavo Pimentel, Rob Herring,
Lorenzo Pieralisi, Krzysztof Wilczyński, Bjorn Helgaas,
linux-pci
Cc: open list
> -----Original Message-----
> From: Tim Harvey <tharvey@gateworks.com>
> Sent: Thursday, December 2, 2021 6:07 AM
> To: Jingoo Han <jingoohan1@gmail.com>; Gustavo Pimentel
> <gustavo.pimentel@synopsys.com>; Rob Herring <robh@kernel.org>;
> Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński
> <kw@linux.com>; Bjorn Helgaas <bhelgaas@google.com>;
> linux-pci@vger.kernel.org
> Cc: open list <linux-kernel@vger.kernel.org>; Hongxing Zhu
> <hongxing.zhu@nxp.com>
> Subject: Re: [PATCH] PCI: imx: do not remap invalid res
>
> On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com>
> wrote:
> >
> > On imx6 and perhaps others when pcie probes you get a:
> > imx6q-pcie 33800000.pcie: invalid resource
> >
> > This occurs because the atu is not specified in the DT and as such it
> > should not be remapped.
> >
> > Cc: Richard Zhu <hongxing.zhu@nxp.com>
> > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[Richard Zhu] Please merge Rob's commit log changes.
Then, Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
Best Regards
Richard Zhu
> > ---
> > drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware.c
> > b/drivers/pci/controller/dwc/pcie-designware.c
> > index a945f0c0e73d..3254f60d1713 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > @@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie
> *pci)
> > if (!pci->atu_base) {
> > struct resource *res =
> >
> platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
> > - if (res)
> > + if (res) {
> > pci->atu_size =
> resource_size(res);
> > - pci->atu_base =
> devm_ioremap_resource(dev, res);
> > - if (IS_ERR(pci->atu_base))
> > + pci->atu_base =
> devm_ioremap_resource(dev, res);
> > + }
> > + if (!pci->atu_base ||
> IS_ERR(pci->atu_base))
> > pci->atu_base = pci->dbi_base
> + DEFAULT_DBI_ATU_OFFSET;
> > }
> >
> > --
> > 2.17.1
> >
>
> ping - any feedback on this?
>
> Best regards,
>
> Tim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-12-02 0:48 ` Hongxing Zhu
@ 2021-12-02 2:41 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2021-12-02 2:41 UTC (permalink / raw)
To: Hongxing Zhu
Cc: tharvey, Jingoo Han, Gustavo Pimentel, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci, open list
On Wed, Dec 1, 2021 at 6:48 PM Hongxing Zhu <hongxing.zhu@nxp.com> wrote:
>
>
> > -----Original Message-----
> > From: Tim Harvey <tharvey@gateworks.com>
> > Sent: Thursday, December 2, 2021 6:07 AM
> > To: Jingoo Han <jingoohan1@gmail.com>; Gustavo Pimentel
> > <gustavo.pimentel@synopsys.com>; Rob Herring <robh@kernel.org>;
> > Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński
> > <kw@linux.com>; Bjorn Helgaas <bhelgaas@google.com>;
> > linux-pci@vger.kernel.org
> > Cc: open list <linux-kernel@vger.kernel.org>; Hongxing Zhu
> > <hongxing.zhu@nxp.com>
> > Subject: Re: [PATCH] PCI: imx: do not remap invalid res
Please fix your quoting style with all the headers (hint: don't use
Outlook). It's base64 encoded too which isn't ideal for maillists, but
somewhat tolerated nowadays.
> >
> > On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com>
> > wrote:
> > >
> > > On imx6 and perhaps others when pcie probes you get a:
> > > imx6q-pcie 33800000.pcie: invalid resource
> > >
> > > This occurs because the atu is not specified in the DT and as such it
> > > should not be remapped.
> > >
> > > Cc: Richard Zhu <hongxing.zhu@nxp.com>
> > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> [Richard Zhu] Please merge Rob's commit log changes.
The maintainer tools do that automatically.
> Then, Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
But probably not when you prefix your tag with 'Then, '... :(
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-11-01 18:02 [PATCH] PCI: imx: do not remap invalid res Tim Harvey
2021-12-01 22:06 ` Tim Harvey
2021-12-01 23:46 ` Rob Herring
@ 2021-12-02 9:43 ` Lorenzo Pieralisi
2 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2021-12-02 9:43 UTC (permalink / raw)
To: Tim Harvey, Gustavo Pimentel, Bjorn Helgaas, linux-pci,
Rob Herring, Krzysztof Wilczyński, Jingoo Han
Cc: Lorenzo Pieralisi, linux-kernel, Richard Zhu
On Mon, 1 Nov 2021 11:02:43 -0700, Tim Harvey wrote:
> On imx6 and perhaps others when pcie probes you get a:
> imx6q-pcie 33800000.pcie: invalid resource
>
> This occurs because the atu is not specified in the DT and as such it
> should not be remapped.
>
>
> [...]
Applied to pci/dwc, thanks!
[1/1] PCI: imx: do not remap invalid res
https://git.kernel.org/lpieralisi/pci/c/6e5ebc96ec
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-12-01 22:06 ` Tim Harvey
2021-12-02 0:48 ` Hongxing Zhu
@ 2021-12-03 20:28 ` Bjorn Helgaas
2021-12-03 20:49 ` Tim Harvey
1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2021-12-03 20:28 UTC (permalink / raw)
To: Tim Harvey
Cc: Jingoo Han, Gustavo Pimentel, Rob Herring, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci, open list,
Richard Zhu
On Wed, Dec 01, 2021 at 02:06:44PM -0800, Tim Harvey wrote:
> On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com> wrote:
> >
> > On imx6 and perhaps others when pcie probes you get a:
> > imx6q-pcie 33800000.pcie: invalid resource
> >
> > This occurs because the atu is not specified in the DT and as such it
> > should not be remapped.
> >
> > Cc: Richard Zhu <hongxing.zhu@nxp.com>
> > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > ---
> > drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> > index a945f0c0e73d..3254f60d1713 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > @@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> > if (!pci->atu_base) {
> > struct resource *res =
> > platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
> > - if (res)
> > + if (res) {
> > pci->atu_size = resource_size(res);
> > - pci->atu_base = devm_ioremap_resource(dev, res);
> > - if (IS_ERR(pci->atu_base))
> > + pci->atu_base = devm_ioremap_resource(dev, res);
> > + }
> > + if (!pci->atu_base || IS_ERR(pci->atu_base))
> > pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
> > }
> >
> > --
> > 2.17.1
> >
>
> ping - any feedback on this?
Looks like Lorenzo corrected the subject line for you and applied it:
https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=6e5ebc96ec65
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: imx: do not remap invalid res
2021-12-03 20:28 ` Bjorn Helgaas
@ 2021-12-03 20:49 ` Tim Harvey
0 siblings, 0 replies; 8+ messages in thread
From: Tim Harvey @ 2021-12-03 20:49 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jingoo Han, Gustavo Pimentel, Rob Herring, Lorenzo Pieralisi,
Krzysztof Wilczyński, Bjorn Helgaas, linux-pci, open list,
Richard Zhu
On Fri, Dec 3, 2021 at 12:28 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Wed, Dec 01, 2021 at 02:06:44PM -0800, Tim Harvey wrote:
> > On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com> wrote:
> > >
> > > On imx6 and perhaps others when pcie probes you get a:
> > > imx6q-pcie 33800000.pcie: invalid resource
> > >
> > > This occurs because the atu is not specified in the DT and as such it
> > > should not be remapped.
> > >
> > > Cc: Richard Zhu <hongxing.zhu@nxp.com>
> > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > > ---
> > > drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> > > 1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> > > index a945f0c0e73d..3254f60d1713 100644
> > > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > > @@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> > > if (!pci->atu_base) {
> > > struct resource *res =
> > > platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
> > > - if (res)
> > > + if (res) {
> > > pci->atu_size = resource_size(res);
> > > - pci->atu_base = devm_ioremap_resource(dev, res);
> > > - if (IS_ERR(pci->atu_base))
> > > + pci->atu_base = devm_ioremap_resource(dev, res);
> > > + }
> > > + if (!pci->atu_base || IS_ERR(pci->atu_base))
> > > pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
> > > }
> > >
> > > --
> > > 2.17.1
> > >
> >
> > ping - any feedback on this?
>
> Looks like Lorenzo corrected the subject line for you and applied it:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=6e5ebc96ec65
Yes, I saw that. Thanks everyone!
Best regards,
Tim
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-12-03 20:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 18:02 [PATCH] PCI: imx: do not remap invalid res Tim Harvey
2021-12-01 22:06 ` Tim Harvey
2021-12-02 0:48 ` Hongxing Zhu
2021-12-02 2:41 ` Rob Herring
2021-12-03 20:28 ` Bjorn Helgaas
2021-12-03 20:49 ` Tim Harvey
2021-12-01 23:46 ` Rob Herring
2021-12-02 9:43 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).