Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp389162pxt; Thu, 5 Aug 2021 02:09:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuGJw8HnR5kcuV2zM+1XlKDea0ZQ0FzxB4QvE9EzsB/X/5gK4U+ZV6dXMxHAHlG0nl0sT+ X-Received: by 2002:a17:906:318c:: with SMTP id 12mr3807031ejy.28.1628154572797; Thu, 05 Aug 2021 02:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628154572; cv=none; d=google.com; s=arc-20160816; b=JLZipQdx1GlS55ZI8ZmKdQ33vVRmr4pUOh1FLTySFsy5AS85AYf5B5PfP/JjmQSD2q WtdtYIExNHOJxECPMqcPpzLq0b5I+rlVLUNgadM+3ej5rU2NK4FkRzIs/EQ86JFv0Cx4 a4LCwXd9xfZuJonLfW4UFHS++nqiJCvMAxaAl6LwlWXhmH2eU3s+yK29IDGX3FKDmOMM SnFwgK+NdPZWb1oYbVVbG1OuaQW/AJIwQmtH3QsIlnxl5pqxPpJkyq3SzXUGHUo81+wP SkXc4OIOFFTQz0hUCE/WEwUW1Movt3Gf4Isn7pAkkcu1UpPa5XVBNqm7/hY+DJujMzBs Oung== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kNYEWDyqGxcvpfriGXWTKC3dHnx4JFUKIKSUgcY00Zk=; b=lkjZYt/jHTANzrFVLi+yA6D2DBFLh+arGZRFC2gvgDwtxAX/nU6Z7nXDqcN/7ukKMe evmEql+PfkM28SjthnDohNERR2jJlY3LeSiSMFPOPb2B3EkMhXd0pZ0dXtYaH6CW1bc7 VyArv5x1/AuFwNRyqitVid8EoQjJMhlwhP1dUYaVHRLN0sY6+jvFo0pIL+/O+mAVHJ02 Pf+b1lD4wiXtQ9euLSqauvZDaWJA/UCncbtqjjDBKyBufY0sORzRVi9I+NFL0+TUjs9J Xdu6CMZL+1McI0IlW1rxkwYia4+zbetO7Yn4AvRcqY1K1gS9UD2H1x0UQGEYlnCHk4Rc Ffqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="N/mCiZWd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si5268961edr.391.2021.08.05.02.09.09; Thu, 05 Aug 2021 02:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="N/mCiZWd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239565AbhHEI33 (ORCPT + 99 others); Thu, 5 Aug 2021 04:29:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:44526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239448AbhHEI3W (ORCPT ); Thu, 5 Aug 2021 04:29:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C0AA6105A; Thu, 5 Aug 2021 08:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628152149; bh=PXKl7KMyp7SLlsXgaxi3qGWK1QDFQApdkdN/A03yZq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N/mCiZWdZanEJLQArYEgGe0ZP3oJVB72D0XLbep1VHeBPl1kKXu4Nr8AK3OttYSlZ awlT+wDjhCwtc9l9K9L3eIP5Tp/Cw0XumsnG1P7Ml8wwcakIL/IBXhzRMk2UfuSO8J gWVQYG5Dgb6q2pqnNV+e7btj48s9Fn8YxS31UGEmrW38QcBES1+k0qe42FvhLOi2wm Wda1m37Fob0XR3zNGn5PHIbFaHI7jD1IdguZ4DwRM6fYwvz4Vht5VVX7Umapv0KdjE s9cvGxRi8W8NlqChYdPIHIXVQukon8KVBUazU6nruumsY5KkW+dMdqPDD9ust0YXXW Ov/kaI/Q8Pxxg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mBYkP-001Dub-Vb; Thu, 05 Aug 2021 10:29:01 +0200 From: Mauro Carvalho Chehab To: Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH 3/3] PCI: of: Add some debug printks to track problems with of_node setup Date: Thu, 5 Aug 2021 10:29:00 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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