lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <c4f873203f8811b8657fc4a01cd1410977e68b84.1628151761.git.mchehab+huawei@kernel.org>
Date:   Thu,  5 Aug 2021 10:29:00 +0200
From:   Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To:     Rob Herring <robh@...nel.org>
Cc:     linuxarm@...wei.com, mauro.chehab@...wei.com,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: [PATCH 3/3] PCI: of: Add some debug printks to track problems with of_node setup

In order to be able to identify why some of_nodes are not created,
we need to add some debug prints.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
 drivers/pci/of.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index b6fa3bd46ae6..7b8c2b87eb25 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -18,6 +18,9 @@
 #ifdef CONFIG_PCI
 void pci_set_of_node(struct pci_dev *dev)
 {
+	dev_dbg(&dev->dev, "%s: of_node: %pOF\n",
+		__func__, dev->bus->dev.of_node);
+
 	if (!dev->bus->dev.of_node)
 		return;
 	dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node,
@@ -41,12 +44,16 @@ void pci_set_bus_of_node(struct pci_bus *bus)
 		node = pcibios_get_phb_of_node(bus);
 	} else {
 		node = of_node_get(bus->self->dev.of_node);
-		if (!node)
+		if (!node) {
 			node = of_node_get(bus->self->dev.parent->of_node);
+			dev_dbg(&bus->dev, "%s: use of_node of the parent",
+				__func__);
+		}
 		if (node && of_property_read_bool(node, "external-facing"))
 			bus->self->external_facing = true;
 	}
 
+	dev_dbg(&bus->dev, "%s: of_node: %pOF\n", __func__, node);
 	bus->dev.of_node = node;
 
 	if (bus->dev.of_node)
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ