From: Bjorn Helgaas <helgaas@kernel.org>
To: Frank Li <Frank.li@nxp.com>
Cc: Richard Zhu <hongxing.zhu@nxp.com>,
dlemoal@kernel.org, jingoohan1@gmail.com, bhelgaas@google.com,
lpieralisi@kernel.org, kw@linux.com,
manivannan.sadhasivam@linaro.org, robh@kernel.org,
quic_krichai@quicinc.com, imx@lists.linux.dev,
kernel@pengutronix.de, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] PCI: dwc: Always stop link in the dw_pcie_suspend_noirq
Date: Tue, 14 Jan 2025 14:26:22 -0600 [thread overview]
Message-ID: <20250114202622.GA483044@bhelgaas> (raw)
In-Reply-To: <Z4a71nPa1H01+Ang@lizhi-Precision-Tower-5810>
On Tue, Jan 14, 2025 at 02:32:38PM -0500, Frank Li wrote:
> On Tue, Jan 14, 2025 at 12:15:18PM -0600, Bjorn Helgaas wrote:
> > On Tue, Dec 10, 2024 at 04:15:56PM +0800, Richard Zhu wrote:
> > > On i.MX8QM, PCIe link can't be re-established again in
> > > dw_pcie_resume_noirq(), if the LTSSM_EN bit is not cleared properly in
> > > dw_pcie_suspend_noirq().
> > >
> > > Add dw_pcie_stop_link() into dw_pcie_suspend_noirq() to fix this issue and
> > > keep symmetric in suspend/resume function since there is
> > > dw_pcie_start_link() in dw_pcie_resume_noirq().
> > >
> > > Fixes: 4774faf854f5 ("PCI: dwc: Implement generic suspend/resume functionality")
> > > Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> > > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > ---
> > > drivers/pci/controller/dwc/pcie-designware-host.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > index f882b11fd7b94..f56cb7b9e6f99 100644
> > > --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> > > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> > > @@ -1001,6 +1001,7 @@ int dw_pcie_suspend_noirq(struct dw_pcie *pci)
> > > return ret;
> > > }
> > >
> > > + dw_pcie_stop_link(pci);
> >
> > We should try to avoid changes to the generic DWC path just to
> > accommodate one controller. Since other DWC-based controllers
> > apparently don't need dw_pcie_stop_link() here, this seems like it
> > might be the wrong place for this change.
> >
> > If doing dw_pcie_stop_link() here is really helpful for all DWC
> > controllers, this would be fine, but the commit log should then explain
> > why it helps everybody, not why one particular controller benefits.
>
> It should be for all dwc controllers although find such problem at i.MX8QM
> platfrom. It should keep symmetric between suspend/resume function.
>
> So far only layerscape and i.MX platform use these common functions. Other
> dwc platform still have not switched to this common function yet.
I see that layerscape uses dw_pcie_suspend_noirq():
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pci-layerscape.c?id=v6.13-rc7#n379
But I don't see where imx6 does:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pci-imx6.c?id=v6.13-rc7#n1236
We don't currently have anything queued that touches pci-imx6.c; am I
missing a patch that converts pci-imx6.c to use
dw_pcie_suspend_noirq()?
This doesn't feel urgent yet since the commit log talks about i.MX8QM,
but I can't make a connection between i.MX8QM and this patch.
Bjorn
next prev parent reply other threads:[~2025-01-14 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 8:15 [PATCH v4 0/2] Bug fixes when dwc generic suspend/resume callbacks are used Richard Zhu
2024-12-10 8:15 ` [PATCH v4 1/2] PCI: dwc: Always stop link in the dw_pcie_suspend_noirq Richard Zhu
2025-01-14 18:15 ` Bjorn Helgaas
2025-01-14 19:32 ` Frank Li
2025-01-14 20:26 ` Bjorn Helgaas [this message]
2025-01-14 20:43 ` Bjorn Helgaas
2025-01-14 20:51 ` Frank Li
2024-12-10 8:15 ` [PATCH v4 2/2] PCI: dwc: Clean up some unnecessary codes in dw_pcie_suspend_noirq() Richard Zhu
2025-01-15 11:33 ` [PATCH v4 0/2] Bug fixes when dwc generic suspend/resume callbacks are used Krzysztof Wilczyński
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250114202622.GA483044@bhelgaas \
--to=helgaas@kernel.org \
--cc=Frank.li@nxp.com \
--cc=bhelgaas@google.com \
--cc=dlemoal@kernel.org \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jingoohan1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=quic_krichai@quicinc.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox