Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, bartosz.golaszewski@linaro.org,
	Jonathan Currier <dullfire@yahoo.com>
Subject: Re: [PATCH] PCI/pwrctrl: Create device link only if both platform device and supplies are present
Date: Wed, 20 Nov 2024 16:18:10 -0600	[thread overview]
Message-ID: <20241120221810.GA2357837@bhelgaas> (raw)
In-Reply-To: <20241120062459.6371-1-manivannan.sadhasivam@linaro.org>

On Wed, Nov 20, 2024 at 11:54:59AM +0530, Manivannan Sadhasivam wrote:
> Checking only for platform device for the PCI devices and creating the
> devlink causes regression on SPARCv9 systems as they seem to have platform
> device populated elsewhere.
> 
> So add a check for supplies in DT to make sure that the devlink is only
> created for devices that require pwrctrl support.
> 
> Reported-by: Jonathan Currier <dullfire@yahoo.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219513
> Fixes: 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed before the PCI client drivers")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks, squashed into 03cfe0e05650 for v6.13:

https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=cc70852b0962

> ---
>  drivers/pci/bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index 7a061cc860d5..e70f4c089cd4 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -394,7 +394,7 @@ void pci_bus_add_device(struct pci_dev *dev)
>  	 * PCI client drivers.
>  	 */
>  	pdev = of_find_device_by_node(dn);
> -	if (pdev) {
> +	if (pdev && of_pci_is_supply_present(dn)) {
>  		if (!device_link_add(&dev->dev, &pdev->dev,
>  				     DL_FLAG_AUTOREMOVE_CONSUMER))
>  			pci_err(dev, "failed to add device link between %s and %s\n",
> -- 
> 2.25.1
> 

      reply	other threads:[~2024-11-20 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-20  6:24 [PATCH] PCI/pwrctrl: Create device link only if both platform device and supplies are present Manivannan Sadhasivam
2024-11-20 22:18 ` Bjorn Helgaas [this message]

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=20241120221810.GA2357837@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=dullfire@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.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