From: Bjorn Helgaas <helgaas@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: "Sean Anderson" <sean.anderson@seco.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Bartosz Golaszewski" <brgl@kernel.org>,
linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, "Chen-Yu Tsai" <wens@kernel.org>,
"Brian Norris" <briannorris@chromium.org>,
"Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
"Niklas Cassel" <cassel@kernel.org>,
"Alex Elder" <elder@riscstar.com>,
"Chen-Yu Tsai" <wenst@chromium.org>
Subject: Re: [PATCH v2 5/5] PCI/pwrctrl: Switch to the new pwrctrl APIs
Date: Fri, 26 Dec 2025 17:07:11 -0600 [thread overview]
Message-ID: <20251226230711.GA4146413@bhelgaas> (raw)
In-Reply-To: <tutxwjciedqoje5wxvtin4h637auni5zzpvb7rtfg4uticxoux@yfl6xg7oht7t>
On Tue, Dec 23, 2025 at 07:41:30PM +0530, Manivannan Sadhasivam wrote:
> On Fri, Dec 19, 2025 at 01:35:39PM -0500, Sean Anderson wrote:
> > On 12/16/25 07:51, Manivannan Sadhasivam wrote:
> > > Adopt the recently introduced pwrctrl APIs to create, power on, destroy,
> > > and power off pwrctrl devices. In qcom_pcie_host_init(), call
> > > pci_pwrctrl_create_devices() to create devices, then
> > > pci_pwrctrl_power_on_devices() to power them on, both after controller
> > > resource initialization. Once successful, deassert PERST# for all devices.
> ...
> > And now you will continually probe the controller until all of the
> > drivers are loaded.
> >
> > There is a non-obvious property of the deferred probe infrastructure
> > which is:
> >
> > Once a device creates children, it must never fail with
> > EPROBE_DEFER.
> >
> > So if you want to have something like this, the pwrctrl devices need to
> > be created before the controller is probed. Or you can use the current
> > system where the pwrctrl devices are probed asynchronously.
>
> You are right and it is an oversight from me. If the pwrctrl driver
> is not found, the pwrctrl devices should not be destroyed in the
> error path, but the controller driver can still return
> -EPROBE_DEFER. This will allow the controller driver to get reprobed
> later and by that time, pwrctrl device creation will be skipped. I
> believe this satisfies the comment you quoted above.
>
> I found this issue while testing the series with one of our Qcom
> switches and I fixed it in yet to be submitted v3.
I guess I should wait for v3 before putting this in linux-next?
next prev parent reply other threads:[~2025-12-26 23:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 12:51 [PATCH v2 0/5] PCI/pwrctrl: Major rework to integrate pwrctrl devices with controller drivers Manivannan Sadhasivam
2025-12-16 12:51 ` [PATCH v2 1/5] PCI: qcom: Parse PERST# from all PCIe bridge nodes Manivannan Sadhasivam
2025-12-26 23:24 ` Bjorn Helgaas
2025-12-27 4:42 ` Manivannan Sadhasivam
2025-12-16 12:51 ` [PATCH v2 2/5] PCI/pwrctrl: Add 'struct pci_pwrctrl::power_{on/off}' callbacks Manivannan Sadhasivam
2025-12-16 12:51 ` [PATCH v2 3/5] PCI/pwrctrl: Add APIs for explicitly creating and destroying pwrctrl devices Manivannan Sadhasivam
2025-12-16 12:51 ` [PATCH v2 4/5] PCI/pwrctrl: Add APIs to power on/off the " Manivannan Sadhasivam
2025-12-16 12:51 ` [PATCH v2 5/5] PCI/pwrctrl: Switch to the new pwrctrl APIs Manivannan Sadhasivam
2025-12-19 18:35 ` Sean Anderson
2025-12-23 14:11 ` Manivannan Sadhasivam
2025-12-26 23:07 ` Bjorn Helgaas [this message]
2025-12-27 4:44 ` Manivannan Sadhasivam
2025-12-18 6:13 ` (subset) [PATCH v2 0/5] PCI/pwrctrl: Major rework to integrate pwrctrl devices with controller drivers Manivannan Sadhasivam
2025-12-19 17:19 ` Sean Anderson
2025-12-19 17:22 ` [PATCH 1/3] PCI/pwrctrl: Bind a pwrctrl device if clocks are present Sean Anderson
2025-12-19 17:22 ` [PATCH 2/3] PCI/pwrctrl: Add appropriate delays for slot power/clocks Sean Anderson
2025-12-19 17:22 ` [PATCH 3/3] PCI/pwrctrl: Support PERST GPIO in slot driver Sean Anderson
2026-01-02 9:52 ` [PATCH 1/3] PCI/pwrctrl: Bind a pwrctrl device if clocks are present Bartosz Golaszewski
2025-12-23 14:05 ` [PATCH v2 0/5] PCI/pwrctrl: Major rework to integrate pwrctrl devices with controller drivers Manivannan Sadhasivam
2026-01-05 15:01 ` Sean Anderson
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=20251226230711.GA4146413@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=brgl@kernel.org \
--cc=briannorris@chromium.org \
--cc=cassel@kernel.org \
--cc=elder@riscstar.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sean.anderson@seco.com \
--cc=wens@kernel.org \
--cc=wenst@chromium.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