From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBBF545FFBB; Wed, 9 Sep 2026 08:02:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788940966; cv=none; b=g93k7FkDsBxu2qTDR494RAHfQIjlYm8H4E3R3Z/hD935ckFDEMe1Kh9Ex/viR5tlUt6QejslZyWB2KobinmsNkZWYdYa4PNwhQHvwlmCQbc7aQ7RzLqLQRSm8w6pU9VSkLSY/UX8vjIjIWIiAsu+u0aajfyDMNYs5sCWMXd4vyc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788940966; c=relaxed/simple; bh=JyaYp74hyva8mz2RggMjk+t8RJI4RaB768yDtXt9oRA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SG9PZoyii8b3Vt2uvh07jjt7dH4hHEd1sr5noLmbXuE/4HOHIVUeTIuWGEZ/zmkyKf7LlkOt7VYmNO4GHWFEoEjb6ZJCWIvcvC67YuvEjBX5FO9GjSi4ixXBRWv5iump8cw47aGiLBhw93vr//7ML/nVaYx557uel7VOy++nkjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=sq8SzsJp; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="sq8SzsJp" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 640384E415A9; Wed, 9 Sep 2026 08:02:43 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3448660448; Wed, 9 Sep 2026 08:02:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DA92D11C7AF66; Wed, 9 Sep 2026 10:02:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788940960; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=I1e0hByJo0lwlUNMu1e3zjHq/L3qiW6+OWE+PPvPOK4=; b=sq8SzsJpHrK3MC8xReqdKMdZsPs43TAZUcH/qjqvzq9zyQ1i14UKA+gjWHNFFb9UWn0G28 +bpG+7IV8uGXjVwHKZKoEWKjCXWXwSjE0PaxoxziUry24bCSLIAOUgPpkSLMOb22ssZ8VV TYoK5HxlWspRs4mTVGL+kKZPTO0/jE5mGyIPDEK8gswLDG7N2DWuMH8qO7oghD/xWNAbjB 8jmIYCWfsHfKBnX0IQtq/fbSvBytzxs+NE3jhpsQWdo/pzmfTXYp5QvqNYiQ+PQNhOp4OQ zBx5ajOhrZ61s4I59SK3wSWvyh54gS1mwE/r9lJuKLnylSVXilF1PA7fXQMstQ== From: Herve Codina To: Richard Cheng , Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Bartosz Golaszewski , Len Brown , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Herve Codina , Lizhi Hou Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org Subject: [PATCH v11 09/10] PCI: of: Remove fwnode_dev_initialized() call for a PCI root bridge node Date: Wed, 9 Sep 2026 10:01:08 +0200 Message-ID: <20260909080114.591938-10-herve.codina@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260909080114.591938-1-herve.codina@bootlin.com> References: <20260909080114.591938-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 During the instantiation of devices described by a device-tree overlay applied on a PCI device, devlink displays the following kind of debug messages instead of creating the expected links: 'Not linking xxxx - might never become dev' Without those expected links, the device removal order cannot be correct. Those debug traces are printed by fw_devlink_create_devlink(). In our use case, they are all printed because the supplier of the link has at least one of its ancestor with its fwnode flag FWNODE_FLAG_INITIALIZED set. The culprit ancestor is the PCI root bridge. The fwnode related to the PCI root bridge is created dynamically by the of_pci_make_host_bridge_node() function. During this creation fwnode_dev_initialized() is called which set the FWNODE_FLAG_INITIALIZED flag. Calling fwnode_dev_initialized() tells devlink that the device related to this node is handled out of the driver core. This is not correct in our case. Indeed the device related to this firmware node is handled using driver core mechanisms and is fully compliant devlink expectations. Simply remove the fwnode_dev_initialized() call. With that done, the devlink debug messages are no more displayed and links that were missing are correctly created. Fixes: 1f340724419e ("PCI: of: Create device tree PCI host bridge node") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Acked-by: Bjorn Helgaas Reviewed-by: Richard Cheng --- drivers/pci/of.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 8914bfa25dc1..0a5797652e18 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -894,7 +894,6 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge) */ of_node_set_flag(np, OF_POPULATED); fw_devlink_set_device(&np->fwnode, &bridge->dev); - fwnode_dev_initialized(&np->fwnode, true); ret = of_changeset_apply(cset); if (ret) -- 2.55.0