From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E4EE83644D1; Wed, 25 Mar 2026 20:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774470039; cv=none; b=eybBcXhRxMxmPtn87BtN2tyZcMcdfxSZUt/3Vfh4OOjuGp65DIV2u0pfE6O8/JElhxGUPZWbN+VE+kgpMOocSSz+uj2NLdfs7/+hRyKUaLlNHBDZ48YuTqK1vet6nCutMXOs6JvvBjMhSR/1EDgQc3XpoF4m6mbAR1aOSS6hZyY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774470039; c=relaxed/simple; bh=EJf9EH03K048GnQyciGn9nJ/4njlCY8sY9h7aSYy5jQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=d/hwnw7DXZ71R5AFbQeXXCrtvFgOKDmscmEvalotQF+3a31/4Ma6W+uZ9Qw+wCSvMBWMNpapeMzBt22kwDRMBsextEGh8G4w2MfQoWoEFcWtHyC2rZfeue+sMkjxFXxIAkj8x6on8EibsojxQ1FTYudKAy2gjaUoASKU56Lwwjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R/sHWhQC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R/sHWhQC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 469B9C4CEF7; Wed, 25 Mar 2026 20:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774470038; bh=EJf9EH03K048GnQyciGn9nJ/4njlCY8sY9h7aSYy5jQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=R/sHWhQCzYd+ZF4ClNbFtPpjz3TwD6fZXZ1sS0wPW8AqP3rl0tovUYaWdonKVWaiJ OwlrlLGPKyQJzjTcNTMD7KHdXAJOjy/Pgec4iK1sQUwsjoZifIZYI5uC0jTlzEGcLG 18viuyai68dZgzN8F87qzLT1SkxhJdMLTx9dm/6064TjKTmgnptwvlSI/XP/fcRtl4 giL0rQUFbbUETMdG05uXbW4WH5fvuqaOMDFtm2P7I5VMCeTlaQAU4irvLB2JumoxMH 16eIDSTM+Evjf3AQNa1cthVdIu/mws4vSuaCZCJQTTLQFydtFozsiRGP5ZJm2cF9Ry tmA3OJZNW4eqw== Date: Wed, 25 Mar 2026 15:20:37 -0500 From: Bjorn Helgaas To: Herve Codina Cc: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo , Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@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: Re: [PATCH v6 13/27] PCI: of: Remove fwnode_dev_initialized() call for a PCI root bridge node Message-ID: <20260325202037.GA1291636@bhelgaas> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260325143555.451852-14-herve.codina@bootlin.com> On Wed, Mar 25, 2026 at 03:35:40PM +0100, Herve Codina wrote: > 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 I would ordinarily make sure the person who added fwnode_dev_initialized() here was ok with its removal, but it looks like you added this with 1f340724419e ("PCI: of: Create device tree PCI host bridge node"), so I assume you're ok with removing it :) I suppose there could be a "Fixes: 1f340724419e" tag, but maybe there's no need to backport this anywhere? Acked-by: Bjorn Helgaas > --- > drivers/pci/of.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/pci/of.c b/drivers/pci/of.c > index b694fcda16b1..0993257fe025 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.53.0 >