linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ajay Agarwal <ajayagarwal@google.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Johan Hovold" <johan@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Johan Hovold" <johan+linaro@kernel.org>,
	"Jon Hunter" <jonathanh@nvidia.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"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, Joao.Pinto@synopsys.com
Subject: Re: [PATCH v5] PCI: dwc: Wait for link up only if link is started
Date: Fri, 14 Feb 2025 15:32:13 +0530	[thread overview]
Message-ID: <Z68UpU0nofdUWddW@google.com> (raw)
In-Reply-To: <20250214094255.jmfpkmzwqn5facsy@thinkpad>

On Fri, Feb 14, 2025 at 03:12:55PM +0530, Manivannan Sadhasivam wrote:
> On Fri, Feb 14, 2025 at 10:18:27AM +0100, Johan Hovold wrote:
> > On Fri, Feb 14, 2025 at 02:45:03PM +0530, Ajay Agarwal wrote:
> > 
> > > Restarting this discussion for skipping the 1 sec of wait time if a
> > > certain platform does not necessarily wish or expect to bring the link
> > > up during probe time. I discussed with William and we think that a
> > > module parameter can be added which if true, would lead to the skipping
> > > of the wait time. By default, this parameter would be false, thereby
> > > ensuring that the current behaviour to wait for the link is maintained.
> > > 
> > > Please let me know if this is worth exploring.
> > 
> > No, module parameters are a thing of the past (except possibly in vendor
> > kernels). The default behaviour should just work.
> > 
> 
> +1
> 
> Btw, you need to come up with a valid argument for not enabling the link during
The argument for the link to not come up during probe is simply that the
product does not need the link to be up during probe. The requirement is
that the PCIe RC SW structures be prepared for link-up later, when there
is a trigger from the userspace or the vendor kernel driver.

I am looking to treat this like USB, say. The USB DWC could be probed when
the cable is not connected. That does not fail the probe. Later when the
cable is connected, the USB link comes up and the enumeration is
performed.

> probe. Also, not waiting for link during probe is also not going to work across
> all platforms where the controller is used, unless your hardware supports
> hotplug or LINK_UP IRQ.
We do not necessarily need the hotplug or LINK_UP IRQ right? Once the
LTSSM training is enabled using the triggers I mentioned above, I can
then wait for the link to come up using `dw_pcie_wait_for_link`. IOW,
polling for the link, which is what the `dw_pcie_host_init` does.

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

  reply	other threads:[~2025-02-14 10:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  9:30 [PATCH v5] PCI: dwc: Wait for link up only if link is started Ajay Agarwal
2024-01-18 18:15 ` Ajay Agarwal
2024-01-19  7:52 ` Manivannan Sadhasivam
2024-01-19 17:59   ` Ajay Agarwal
2024-01-20 14:34     ` Manivannan Sadhasivam
2024-01-29  6:51       ` Ajay Agarwal
2024-01-29  7:10         ` Manivannan Sadhasivam
2024-01-29  8:04           ` Ajay Agarwal
2024-01-29  8:12             ` Manivannan Sadhasivam
2024-01-29 13:26               ` Ajay Agarwal
2024-01-30  6:45                 ` Manivannan Sadhasivam
2024-01-30  9:00                   ` Ajay Agarwal
2024-01-30 12:29                     ` Manivannan Sadhasivam
2024-01-30 17:18                       ` Ajay Agarwal
2024-01-30 18:36                         ` Manivannan Sadhasivam
2024-02-05 11:00                           ` Ajay Agarwal
2024-02-06 17:10                             ` Manivannan Sadhasivam
2024-02-14 22:02                               ` Bjorn Helgaas
2024-02-15 14:09                                 ` Manivannan Sadhasivam
2024-02-17  0:07                                   ` Bjorn Helgaas
2024-02-19 14:13                                     ` Manivannan Sadhasivam
2024-02-22  4:30                                   ` Ajay Agarwal
2024-02-28  2:55                                     ` Ajay Agarwal
2024-02-20 17:34                               ` Ajay Agarwal
2024-02-28 17:29                                 ` Manivannan Sadhasivam
2024-03-06 12:00                                   ` Ajay Agarwal
2024-03-10 13:51                                     ` Manivannan Sadhasivam
2025-02-14  9:15                                       ` Ajay Agarwal
2025-02-14  9:18                                         ` Johan Hovold
2025-02-14  9:42                                           ` Manivannan Sadhasivam
2025-02-14 10:02                                             ` Ajay Agarwal [this message]
2025-02-14 13:39                                               ` Manivannan Sadhasivam
2025-02-14 18:38                                                 ` William McVicker
2025-02-19 17:46                                                   ` Manivannan Sadhasivam
2024-01-31 23:48   ` Bjorn Helgaas
2024-02-01  3:14     ` Bjorn Helgaas
2024-02-01  7:32       ` Manivannan Sadhasivam
2024-02-01  8:37         ` Lei Chuan Hua
2024-01-19 20:42 ` Bjorn Helgaas
2024-01-24  9:24   ` Ajay Agarwal

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=Z68UpU0nofdUWddW@google.com \
    --to=ajayagarwal@google.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=johan+linaro@kernel.org \
    --cc=johan@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@linaro.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;
as well as URLs for NNTP newsgroup(s).