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: <egnjo4t6odkhnbcusy2daosqm37a36bu6xc25pdgr4bbli2v5j@r7cwxkwfafbj>
Date: Thu, 15 Jan 2026 21:05:44 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Hongxing Zhu <hongxing.zhu@....com>
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>, 
	"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 v8 2/2] PCI: dwc: Don't return error when wait for link
 up in dw_pcie_resume_noirq()

On Wed, Jan 14, 2026 at 06:46:23AM +0000, Hongxing Zhu wrote:
> > -----Original Message-----
> > From: Manivannan Sadhasivam <mani@...nel.org>
> > Sent: 2026年1月13日 23:30
> > 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;
> > 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 v8 2/2] PCI: dwc: Don't return error when wait for link up
> > in dw_pcie_resume_noirq()
> >
> > On Wed, Jan 07, 2026 at 10:45:53AM +0800, Richard Zhu wrote:
> > > When waiting for the PCIe link to come up, both link up and link down
> > > are valid results depending on the device state.
> > >
> > > Since the link may come up later and to get rid of the following
> > > mis-reported PM errors. Do not return an -ETIMEDOUT error, as the
> > > outcome has already been reported in dw_pcie_wait_for_link().
> > >
> > > PM error logs introduced by the -ETIMEDOUT error return.
> > > imx6q-pcie 33800000.pcie: Phy link never came up imx6q-pcie
> > > 33800000.pcie: PM: dpm_run_callback(): genpd_resume_noirq returns -110
> > > imx6q-pcie 33800000.pcie: PM: failed to resume noirq: error -110
> > >
> > > Cc: stable@...r.kernel.org
> > > Fixes: 4774faf854f5 ("PCI: dwc: Implement generic suspend/resume
> > > functionality")
> > > Signed-off-by: Richard Zhu <hongxing.zhu@....com>
> > > Reviewed-by: Frank Li <Frank.Li@....com>
> > > ---
> > >  drivers/pci/controller/dwc/pcie-designware-host.c | 7 +++----
> > >  1 file changed, 3 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c
> > > b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > index 06cbfd9e1f1e..025e11ebd571 100644
> > > --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> > > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > @@ -1245,10 +1245,9 @@ int dw_pcie_resume_noirq(struct dw_pcie *pci)
> > >     if (ret)
> > >             return ret;
> > >
> > > -   ret = dw_pcie_wait_for_link(pci);
> > > -   if (ret)
> > > -           return ret;
> > > +   /* Ignore errors, the link may come up later */
> > > +   dw_pcie_wait_for_link(pci);
> >
> > It is not safe to ignore failures during resume. Because, if a device gets
> > removed during suspend, the link up error will be unnoticed. I've proposed a
> > different logic in this series, which should address your issue:
> > https://lore.kern/
> > el.org%2Flinux-pci%2F20260107-pci-dwc-suspend-rework-v4-0-9b5f3c72df0a%
> > 40oss.qualcomm.com%2F&data=05%7C02%7Chongxing.zhu%40nxp.com%7Cf8
> > 79871f9d0445aa0a3c08de52b8a2c0%7C686ea1d3bc2b4c6fa92cd99c5c301635
> > %7C0%7C0%7C639039150121991830%7CUnknown%7CTWFpbGZsb3d8eyJFbXB
> > 0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbC
> > IsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=PNdsT530dbRQkgYsrr99gB1cUE
> > BLOkynvciC9tiB0Ic%3D&reserved=0
> >
> > Please test it out.
> Hi Mani:
> You're right.
> Tested on i.MX platforms, no error return anymore. Only "Device not found" is
>  dumped out when no endpoint device is connected. Thanks.
> Tested-by: Richard Zhu <hongxing.zhu@....com>
> 

Please share the tag by replying to that series.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ