From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Ajay Agarwal <ajayagarwal@google.com>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
"Johan Hovold" <johan+linaro@kernel.org>,
"Jon Hunter" <jonathanh@nvidia.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Manu Gautam" <manugautam@google.com>,
"Doug Zobel" <zobel@google.com>,
"William McVicker" <willmcvicker@google.com>,
"Serge Semin" <fancer.lancer@gmail.com>,
"Robin Murphy" <robin.murphy@arm.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v1 2/2] PCI: dwc: Wait for link up only if link is started
Date: Mon, 29 Jan 2024 11:56:54 +0530 [thread overview]
Message-ID: <20240129062654.GB2971@thinkpad> (raw)
In-Reply-To: <20240124092533.1267836-3-ajayagarwal@google.com>
On Wed, Jan 24, 2024 at 02:55:33PM +0530, Ajay Agarwal wrote:
> In dw_pcie_host_init(), regardless of whether the link has been
> started or not, the code waits for the link to come up. Even in
> cases where .start_link() is not defined the code ends up
> spinning in a loop for one second. Since in some systems
> dw_pcie_host_init() gets called during probe, this one second
> loop for each PCIe interface instance ends up extending the boot
> time.
>
> Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
> ---
> This is actually patch v6 for [1] which I have made a part of the
> patch series.
>
> v4 [2] was applied, but then reverted [3]. The reason being v4 added
> a regression on some products which expect the link to not come
> up as a part of the probe. Since v4 returned error from
> dw_pcie_wait_for_link check, the probe function of these products
> started to fail.
>
What happened to the previous thread [1]? You did not resolve my comment there
and posted a new series. You are not going to make progress if you skip
responding to review comments, sorry.
- Mani
[1] https://lore.kernel.org/linux-pci/20240120143434.GA5405@thinkpad/
> [1] https://lore.kernel.org/all/20240112093006.2832105-1-ajayagarwal@google.com/
> [2] https://lore.kernel.org/all/20230412093425.3659088-1-ajayagarwal@google.com/
> [3] https://lore.kernel.org/all/20230706082610.26584-1-johan+linaro@kernel.org/
>
> drivers/pci/controller/dwc/pcie-designware-host.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 7991f0e179b2..e53132663d1d 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -487,14 +487,18 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
> if (ret)
> goto err_remove_edma;
>
> - if (!dw_pcie_link_up(pci)) {
> + if (dw_pcie_link_up(pci)) {
> + dw_pcie_print_link_status(pci);
> + } else {
> ret = dw_pcie_start_link(pci);
> if (ret)
> goto err_remove_edma;
> - }
>
> - /* Ignore errors, the link may come up later */
> - dw_pcie_wait_for_link(pci);
> + if (pci->ops && pci->ops->start_link) {
> + /* Ignore errors, the link may come up later */
> + dw_pcie_wait_for_link(pci);
> + }
> + }
>
> bridge->sysdata = pp;
>
> --
> 2.43.0.429.g432eaa2c6b-goog
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-01-29 6:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 9:25 [PATCH v1 0/2] PCI: dwc: Remove the delay from PCIe probe path Ajay Agarwal
2024-01-24 9:25 ` [PATCH v1 1/2] PCI: dwc: Add helper function to print link status Ajay Agarwal
2024-01-24 9:25 ` [PATCH v1 2/2] PCI: dwc: Wait for link up only if link is started Ajay Agarwal
2024-01-29 6:26 ` Manivannan Sadhasivam [this message]
2024-01-29 6:23 ` [PATCH v1 0/2] PCI: dwc: Remove the delay from PCIe probe path Manivannan Sadhasivam
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=20240129062654.GB2971@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=ajayagarwal@google.com \
--cc=bhelgaas@google.com \
--cc=fancer.lancer@gmail.com \
--cc=jingoohan1@gmail.com \
--cc=johan+linaro@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manugautam@google.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=willmcvicker@google.com \
--cc=zobel@google.com \
/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