From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 08615316902; Wed, 15 Oct 2025 07:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760512761; cv=none; b=Sd7kM6MMMQ6XwyokOgmkSOM9wHw70teHugrNMk0fcRgoG0rUFFXf5fEBHbEmXrzqToFCoqUpz10ZTm6TrjoJpsbAmXvHWgvrgEtiAFtayJ/LxTNLxGMIvqDL04GU9DEldaB2+KW6vXvycT05mnzXuYiWb2q4qnLW8f7Ag1wSa7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760512761; c=relaxed/simple; bh=h27YkAkFmaaO9z5SDi8KAHY7HfIzJmKXF0EeRIM9YYw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ak9yoN51zCToCxfdGmaR6LdGjfKtty6ZVXDK9F+52DuQPHQnnwYwodggIVtT2TqL4M9tb3BjkiIA+A9hk2H3v7RV0bBNWcEcGHMl7GUfUpn3BmGKgjfCq2cpUCqS8ZHDNRndlr95UqQCi9J3q6oTDQSWEJT5Ls7VWPgnDb7JjC8= 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=fhajyw10; arc=none smtp.client-ip=185.171.202.116 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="fhajyw10" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 9C312C09FA9; Wed, 15 Oct 2025 07:18:59 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B5A8D606FA; Wed, 15 Oct 2025 07:19:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3DAAB102F22BF; Wed, 15 Oct 2025 09:19:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1760512755; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=y9DaiWzLiow70LlXauI/CfyUS2lb/2K9p90X1QtJ9vA=; b=fhajyw10Tsn61Sv7TL5x22+7CQ33mJejCurUlOypsJCcHV14kSkX6bwPVi+KHeM0AhaViw z7uIldRHoYTWOHIbeyENHb1hCfNfs3usairLMI4CAABsPAm63e8c2k8uw+agmxHJQjcVMq nqzySsots2KDTbTz5Pd3r+hj2Xdp2gmmPZvnuR5oM3eeQJELZ/jDZBUOGavzxsCTX7XJJV IuPH0cDB8T1t5jeiuLbXW2VQOPOu3G45c4B9GImEOXNkvdktlom4YxcJIPBX/R9SGjQEpS f2wrqYayb37zNeiVPpt0AjBbwcE33FgR+NUwbbvhNkVWtCs3WmdHwX6vdYUFpg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Geert Uytterhoeven Cc: Wolfram Sang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v4 15/29] PCI: of: Remove fwnode_dev_initialized() call for a PCI root bridge node Date: Wed, 15 Oct 2025 09:14:02 +0200 Message-ID: <20251015071420.1173068-16-herve.codina@bootlin.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251015071420.1173068-1-herve.codina@bootlin.com> References: <20251015071420.1173068-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-pm@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. Signed-off-by: Herve Codina --- drivers/pci/of.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index bbbab115d47f..6b45eca63904 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -811,7 +811,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.51.0