[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241120062459.6371-1-manivannan.sadhasivam@linaro.org>
Date: Wed, 20 Nov 2024 11:54:59 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
bartosz.golaszewski@...aro.org,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Jonathan Currier <dullfire@...oo.com>
Subject: [PATCH] PCI/pwrctrl: Create device link only if both platform device and supplies are present
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@...oo.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@...aro.org>
---
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
Powered by blists - more mailing lists