From: Frank Li <Frank.li@nxp.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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:32:38 -0500 [thread overview]
Message-ID: <Z4a71nPa1H01+Ang@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250114181518.GA473181@bhelgaas>
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.
Frank
>
> If it's only needed for i.MX8QM, we do already have a
> controller-specific hook (.deinit()) just below; maybe that could be
> used?
>
> > if (pci->pp.ops->deinit)
> > pci->pp.ops->deinit(&pci->pp);
> >
> > --
> > 2.37.1
> >
next prev parent reply other threads:[~2025-01-14 19:32 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 [this message]
2025-01-14 20:26 ` Bjorn Helgaas
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=Z4a71nPa1H01+Ang@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=bhelgaas@google.com \
--cc=dlemoal@kernel.org \
--cc=helgaas@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