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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <AS8PR04MB8676883A907B64E70CEC3B9C8C77A@AS8PR04MB8676.eurprd04.prod.outlook.com>
Date: Fri, 13 Jun 2025 06:13:56 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: "tharvey@...eworks.com" <tharvey@...eworks.com>, Frank Li
	<frank.li@....com>
CC: "l.stach@...gutronix.de" <l.stach@...gutronix.de>, "lpieralisi@...nel.org"
	<lpieralisi@...nel.org>, "kw@...ux.com" <kw@...ux.com>,
	"manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
	"robh@...nel.org" <robh@...nel.org>, "bhelgaas@...gle.com"
	<bhelgaas@...gle.com>, "shawnguo@...nel.org" <shawnguo@...nel.org>,
	"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>, "kernel@...gutronix.de"
	<kernel@...gutronix.de>, "festevam@...il.com" <festevam@...il.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "imx@...ts.linux.dev"
	<imx@...ts.linux.dev>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 1/2] PCI: imx6: Remove apps_reset toggle in _core_reset
 functions

> -----Original Message-----
> From: Tim Harvey <tharvey@...eworks.com>
> Sent: 2025年6月13日 3:48
> To: Frank Li <frank.li@....com>
> Cc: Hongxing Zhu <hongxing.zhu@....com>; l.stach@...gutronix.de;
> lpieralisi@...nel.org; kw@...ux.com; manivannan.sadhasivam@...aro.org;
> robh@...nel.org; bhelgaas@...gle.com; shawnguo@...nel.org;
> s.hauer@...gutronix.de; kernel@...gutronix.de; festevam@...il.com;
> linux-pci@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> imx@...ts.linux.dev; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 1/2] PCI: imx6: Remove apps_reset toggle in _core_reset
> functions
> 
> On Thu, Jun 12, 2025 at 9:11 AM Frank Li <Frank.li@....com> wrote:
> >
> > On Thu, Jun 12, 2025 at 10:27:46AM +0800, Richard Zhu wrote:
> > > apps_reset is LTSSM_EN on i.MX7, i.MX8MQ, i.MX8MM and i.MX8MP
> platforms.
> > > Since the assertion/de-assertion of apps_reset(LTSSM_EN bit) had
> > > been wrappered in imx_pcie_ltssm_enable() and
> > > imx_pcie_ltssm_disable();
> > >
> > > Remove apps_reset toggle in imx_pcie_assert_core_reset() and
> > > imx_pcie_deassert_core_reset() functions. Use
> > > imx_pcie_ltssm_enable() and imx_pcie_ltssm_disable() to configure
> apps_reset directly.
> > >
> > > Fix fail to enumerate reliably PI7C9X2G608GP (hotplug) at i.MX8MM,
> > > which reported By Tim.
> > >
> >
> > You may rename apps_reset to ltssm_reset to avoid confuse for legancy
> > platform later.
> 
> Hi Frank and Richard,
> 
> I was thinking of making the same suggestion however the apps reset is in
> several places:
> - imx8m*.dtsi pci node as 'reset-names' and reset index number #define
> - imx8m*-reset.h bindings as reset index number/define
> - pci-imx.c driver
> 
> Granted it is used by imx7d.dtsi, fsl,imx8mq-pcie, fsl,imx8mm-pcie,
> fsl,imx8mp-pcie and in every one of those reference manuals it's bit6 of
> SRC_PCIEPH_RCR named PCIE_CTRL_APPS_EN but described as
> 'Pcie_ctrl_app_ltssm_enable'. Can you ask your references to get more
> definition for this bit? I'm still unclear why 'de-asserting' it twice was an issue.
I suspect that the link had been abnormal already before 'de-asserting'
 the ltssm_en bit at twice time. The regmap_read() trigger the hang in
 your use case actually.

Best Regards
Richard Zhu
> 
> Regardless, any cleanup changing the name can be a seperate patch in my
> opinion.
> 
> Best Regards,
> 
> Tim
> 
> 
> >
> > Reviewed-by: Frank Li <Frank.Li@....com>
> >
> >
> > > Reported-by: Tim Harvey <tharvey@...eworks.com>
> > > Closes:
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flo
> > >
> re.kernel.org%2Fall%2FCAJ%2BvNU3ohR2YKTwC4xoYrc1z-neDoH2TTZcMHDy%
> 2Bp
> > >
> oj9%3DjSy%2Bw%40mail.gmail.com%2F&data=05%7C02%7Chongxing.zhu%40
> nxp.
> > >
> com%7C3d1b3ffa38ef4038063a08dda9ea0c63%7C686ea1d3bc2b4c6fa92cd99c
> 5c3
> > >
> 01635%7C0%7C0%7C638853544881671954%7CUnknown%7CTWFpbGZsb3d8e
> yJFbXB0e
> > >
> U1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsI
> > >
> ldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=7vV5HyEaluYf4i4l2anEX%2Fb6z3x
> UPc0
> > > urhHNIdTPKwU%3D&reserved=0
> > > Fixes: ef61c7d8d032 ("PCI: imx6: Deassert apps_reset in
> > > imx_pcie_deassert_core_reset()")
> > > Signed-off-by: Richard Zhu <hongxing.zhu@....com>
> > > ---
> > >  drivers/pci/controller/dwc/pci-imx6.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > > b/drivers/pci/controller/dwc/pci-imx6.c
> > > index 5f267dd261b5..f4e0342f4d56 100644
> > > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > > @@ -776,7 +776,6 @@ static int imx7d_pcie_core_reset(struct imx_pcie
> > > *imx_pcie, bool assert)  static void
> > > imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)  {
> > >       reset_control_assert(imx_pcie->pciephy_reset);
> > > -     reset_control_assert(imx_pcie->apps_reset);
> > >
> > >       if (imx_pcie->drvdata->core_reset)
> > >               imx_pcie->drvdata->core_reset(imx_pcie, true); @@
> > > -788,7 +787,6 @@ static void imx_pcie_assert_core_reset(struct
> > > imx_pcie *imx_pcie)  static int imx_pcie_deassert_core_reset(struct
> > > imx_pcie *imx_pcie)  {
> > >       reset_control_deassert(imx_pcie->pciephy_reset);
> > > -     reset_control_deassert(imx_pcie->apps_reset);
> > >
> > >       if (imx_pcie->drvdata->core_reset)
> > >               imx_pcie->drvdata->core_reset(imx_pcie, false); @@
> > > -1176,6 +1174,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
> > >               }
> > >       }
> > >
> > > +     /* Make sure that PCIe LTSSM is cleared */
> > > +     imx_pcie_ltssm_disable(dev);
> > > +
> > >       ret = imx_pcie_deassert_core_reset(imx_pcie);
> > >       if (ret < 0) {
> > >               dev_err(dev, "pcie deassert core reset failed: %d\n",
> > > ret);
> > > --
> > > 2.37.1
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ