[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AS8PR04MB86765B904FEC1AA88F6F83468C5C2@AS8PR04MB8676.eurprd04.prod.outlook.com>
Date: Thu, 7 Nov 2024 08:47:54 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: Krzysztof Wilczy��ski <kw@...ux.com>
CC: Bjorn Helgaas <helgaas@...nel.org>, "bhelgaas@...gle.com"
<bhelgaas@...gle.com>, "lorenzo.pieralisi@....com"
<lorenzo.pieralisi@....com>, Frank Li <frank.li@....com>, "mani@...nel.org"
<mani@...nel.org>, "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "kernel@...gutronix.de"
<kernel@...gutronix.de>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>
Subject: RE: [PATCH v2] PCI: dwc: Fix resume failure if no EP is connected at
some platforms
> -----Original Message-----
> From: Hongxing Zhu
> Sent: 2024年11月7日 16:41
> To: Krzysztof Wilczy��ski <kw@...ux.com>
> Cc: Bjorn Helgaas <helgaas@...nel.org>; bhelgaas@...gle.com;
> lorenzo.pieralisi@....com; Frank Li <frank.li@....com>; mani@...nel.org;
> linux-pci@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> linux-kernel@...r.kernel.org; kernel@...gutronix.de; imx@...ts.linux.dev
> Subject: RE: [PATCH v2] PCI: dwc: Fix resume failure if no EP is connected at
> some platforms
>
> > -----Original Message-----
> > From: Krzysztof Wilczy��ski <kw@...ux.com>
> > Sent: 2024年11月7日 15:20
> > To: Hongxing Zhu <hongxing.zhu@....com>
> > Cc: Bjorn Helgaas <helgaas@...nel.org>; bhelgaas@...gle.com;
> > lorenzo.pieralisi@....com; Frank Li <frank.li@....com>;
> > mani@...nel.org; linux-pci@...r.kernel.org;
> > linux-arm-kernel@...ts.infradead.org;
> > linux-kernel@...r.kernel.org; kernel@...gutronix.de;
> > imx@...ts.linux.dev
> > Subject: Re: [PATCH v2] PCI: dwc: Fix resume failure if no EP is
> > connected at some platforms
> >
> > Hello,
> >
> > > > But I don't think you responded to the race question. What
> > > > happens
> > here?
> > > >
> > > > if (dw_pcie_get_ltssm(pci) > DW_PCIE_LTSSM_DETECT_ACT) {
> > > > --> link goes down here <--
> > > > pci->pp.ops->pme_turn_off(&pci->pp);
> > > >
> > > > You decide the LTSSM is active and the link is up. Then the link
> > > > goes
> > down.
> > > > Then you send PME_Turn_off. Now what?
> > > >
> > > > If it's safe to try to send PME_Turn_off regardless of whether the
> > > > link is up or down, there would be no need to test the LTSSM state.
> > > I made a local tests on i.MX95/i.MX8QM/i.MX8MP/i.MX8MM/i.MX8MQ,
> > and
> > > confirm that it's safe to send PME_TURN_OFF although the link is down.
> > > You're right. It's no need to test LTSSM state here.
> > > So do the L2 poll listed above after PME_TURN_OFF is sent.
> > >
> > > Since the 6.13 merge window is almost closed.
> > > How about I prepare another Fix patch to do the following items for
> > > incoming 6.14?
> > > - Before sending PME_TURN_OFF, don't test the LTSSM stat.
> > > - Remove the L2 stat poll, after sending PME_TURN_OFF.
> >
> > If the changes aren't too involved, then I would rather fix it or drop
> > the not needed code now, before we sent the Pull Request.
> >
> > So, feel free to sent a small patch against the current branch, or
> > simply let me know how do you wish the current code to be changed, so
> > I can do it against the current branch.
> Thanks for your kindly reminder.
> This clean up small patch is on the way.
Here it is.
https://lkml.org/lkml/2024/11/7/409
Thanks.
Best Regards
Richard Zhu
>
> Best Regards
> Richard Zhu
> >
> > Thank you!
> >
> > Krzysztof
Powered by blists - more mailing lists