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:
 <AS8PR04MB8833B3F0E22A8E77B24FB7938C1EA@AS8PR04MB8833.eurprd04.prod.outlook.com>
Date: Fri, 26 Sep 2025 06:09:59 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: Bjorn Helgaas <helgaas@...nel.org>
CC: Frank Li <frank.li@....com>, "jingoohan1@...il.com"
	<jingoohan1@...il.com>, "l.stach@...gutronix.de" <l.stach@...gutronix.de>,
	"lpieralisi@...nel.org" <lpieralisi@...nel.org>, "kwilczynski@...nel.org"
	<kwilczynski@...nel.org>, "mani@...nel.org" <mani@...nel.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>, "stable@...r.kernel.org"
	<stable@...r.kernel.org>
Subject: RE: [PATCH v6 3/4] PCI: dwc: Skip PME_Turn_Off message if there is no
 endpoint connected

> -----Original Message-----
> From: Bjorn Helgaas <helgaas@...nel.org>
> Sent: 2025年9月25日 4:00
> To: Hongxing Zhu <hongxing.zhu@....com>
> Cc: Frank Li <frank.li@....com>; jingoohan1@...il.com;
> l.stach@...gutronix.de; lpieralisi@...nel.org; kwilczynski@...nel.org;
> mani@...nel.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; stable@...r.kernel.org
> Subject: Re: [PATCH v6 3/4] PCI: dwc: Skip PME_Turn_Off message if there is no
> endpoint connected
> 
> On Wed, Sep 24, 2025 at 03:23:23PM +0800, Richard Zhu wrote:
> > A chip freeze is observed on i.MX7D when PCIe RC kicks off the PM_PME
> > message and no any devices are connected on the port.
> 
> s/no any/no/
> 
> > To workaroud such kind of issue, skip PME_Turn_Off message if there is
> > no endpoint connected.
> 
> s/workaroud/work around/
> 
> > Cc: stable@...r.kernel.org
> > Fixes: 4774faf854f5 ("PCI: dwc: Implement generic suspend/resume
> > functionality")
> > Fixes: a528d1a72597 ("PCI: imx6: Use DWC common suspend resume
> > method")
> > Signed-off-by: Richard Zhu <hongxing.zhu@....com>
> > Reviewed-by: Frank Li <Frank.Li@....com>
> > ---
> >  drivers/pci/controller/dwc/pcie-designware-host.c | 15
> > +++++++++------
> >  1 file changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c
> > b/drivers/pci/controller/dwc/pcie-designware-host.c
> > index 57a1ba08c427..b303a74b0fd7 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> > @@ -1008,12 +1008,15 @@ int dw_pcie_suspend_noirq(struct dw_pcie *pci)
> >  	u32 val;
> >  	int ret;
> >
> > -	if (pci->pp.ops->pme_turn_off) {
> > -		pci->pp.ops->pme_turn_off(&pci->pp);
> > -	} else {
> > -		ret = dw_pcie_pme_turn_off(pci);
> > -		if (ret)
> > -			return ret;
> > +	/* Skip PME_Turn_Off message if there is no endpoint connected */
> > +	if (dw_pcie_get_ltssm(pci) > DW_PCIE_LTSSM_DETECT_WAIT) {
> 
> This looks racy and it sounds like this is a workaround for an i.MX7D defect.
> Should it be some kind of quirk just for i.MX7D?
Up to now, it is used to fix the issue encountered by i.MX7D PCIe.
If the LTSSM stat is changed, for example one device is new inserted if Hot-Plug
 is supported. The procedure of PME_Turn_Off kick off would terminated by the
 hot-plug event I think.

Best Regards
Richard Zhu
> 
> > +		if (pci->pp.ops->pme_turn_off) {
> > +			pci->pp.ops->pme_turn_off(&pci->pp);
> > +		} else {
> > +			ret = dw_pcie_pme_turn_off(pci);
> > +			if (ret)
> > +				return ret;
> > +		}
> >  	}
> >
> >  	if (dwc_quirk(pci, QUIRK_NOL2POLL_IN_PM)) {
> > --
> > 2.37.1
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ