lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250327181526.GA1470997@bhelgaas>
Date: Thu, 27 Mar 2025 13:15:26 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ioana Ciornei <ioana.ciornei@....com>
Cc: Roy Zang <roy.zang@....com>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Krzysztof WilczyƄski <kw@...ux.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
	Frank Li <Frank.Li@....com>, linux-pci@...r.kernel.org,
	imx@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: layerscape: fix index passed to
 syscon_regmap_lookup_by_phandle_args

On Thu, Mar 27, 2025 at 12:55:57PM -0500, Bjorn Helgaas wrote:
> On Thu, Mar 27, 2025 at 05:19:49PM +0200, Ioana Ciornei wrote:
> > The arg_count variable passed to the
> > syscon_regmap_lookup_by_phandle_args() function represents the number of
> > argument cells following the phandle. In this case, the number of
> > arguments should be 1 instead of 2 since the dt property looks like
> > below.
> > 	fsl,pcie-scfg = <&scfg 0>;
> > 
> > Without this fix, layerscape-pcie fails with the following message on
> > LS1043A:
> > 
> > [    0.157041] OF: /soc/pcie@...0000: phandle scfg@...0000 needs 2, found 1
> > [    0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> > [    0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
> > 
> > Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
> > Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
> 
> Thanks, applied to pci/controller/layerscape for v6.15.  Hopefully the
> last change for this cycle :)
> 
> Thanks for the message sample.  I dropped the timestamps because
> they're not really relevant here.

I guess this should have a stable tag since 149fc35734e5 appeared in
v6.14.  I added one.

> > ---
> >  drivers/pci/controller/dwc/pci-layerscape.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> > index 239a05b36e8e..a44b5c256d6e 100644
> > --- a/drivers/pci/controller/dwc/pci-layerscape.c
> > +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> > @@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
> >  	if (pcie->drvdata->scfg_support) {
> >  		pcie->scfg =
> >  			syscon_regmap_lookup_by_phandle_args(dev->of_node,
> > -							     "fsl,pcie-scfg", 2,
> > +							     "fsl,pcie-scfg", 1,
> >  							     index);
> >  		if (IS_ERR(pcie->scfg)) {
> >  			dev_err(dev, "No syscfg phandle specified\n");
> > -- 
> > 2.34.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ