From nobody Fri Apr 3 03:00:11 2026 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 D746526D4DF; Tue, 17 Feb 2026 10:18:51 +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=1771323531; cv=none; b=mtK8pCxB3j7PxQffjc9uV/T5+hTY+KXe6WsZXpSLUtJvdyj1MjpOBeO0SJu2vX6DlwPw5JiPkChUsI0nCVoaF13jBit8VLpe+B9se67kfJhfx9TjwVM2DBQBbJAyE/2voQNfHe4ShmfYelihalbblSAtMbmVyjIQgGbCG0HN8Tk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771323531; c=relaxed/simple; bh=Q/zVyu7CI5pjjEHPGyvPCbmm2PQIolRXhxF5AltK8FU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bKHJg0yY+0lE57fzx6PmVINtYrX/pLWotw7Do5r6iJYAChujU4HqZFsjvOLv0T8E7i8Ez3/uCqtjRvudK7S+khJp+8/h5IF7ALKOMRx8Odvb2M1Ng76nJEw5jEA409TY6EsZ6NUCBGoZr3a8bVUYetTP6Y0p+LV4gHbnTPbDPf4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=borzDJbX; 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="borzDJbX" Received: by smtp.kernel.org (Postfix) with ESMTPS id 912C2C2BC87; Tue, 17 Feb 2026 10:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771323531; bh=Q/zVyu7CI5pjjEHPGyvPCbmm2PQIolRXhxF5AltK8FU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=borzDJbXL8vyBL1QANT9NL0X5BTmRMCGRZJAJolGg5neN0QGCW+mt71kOpfSizu8Y KNNsDndOigx0vfwa2BxaXMBTanFaxjTmZoa/oDdVMkQfCb0qLS5qRERlHn9s1i554D 6deyoU/KaQM489dcaEA6/vmHMfqOGm9mcPmGesRyEnd4Iq8ufvXfSEfwisMyZ7tEQv YvOdTRfcH85GKWk4rav2EU2OsxY7uHzWIbADkhFhTHEAhuBMIloPY+OI6snLUpbsdk VHrOYH6SqdwC4BmTciZqyWVlLVkEcs06IzWfkZVXkO2at49zQTfqRMZiuZDPICLPAf pzuNhNM3D8tGQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82161E68161; Tue, 17 Feb 2026 10:18:51 +0000 (UTC) From: Manivannan Sadhasivam via B4 Relay Date: Tue, 17 Feb 2026 15:48:46 +0530 Subject: [PATCH 1/2] PCI/pwrctrl: Ensure that the remote endpoint node parent has the supply requirement Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260217-pwrctrl-fixes-7-0-v1-1-b5671e58934f@oss.qualcomm.com> References: <20260217-pwrctrl-fixes-7-0-v1-0-b5671e58934f@oss.qualcomm.com> In-Reply-To: <20260217-pwrctrl-fixes-7-0-v1-0-b5671e58934f@oss.qualcomm.com> To: Bartosz Golaszewski , Manivannan Sadhasivam , Bjorn Helgaas , Krishna Chaitanya Chundru Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Manivannan Sadhasivam , Raj Kumar Bhagat X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3183; i=manivannan.sadhasivam@oss.qualcomm.com; h=from:subject:message-id; bh=wlUdzqhUB+4RSVFnFt3JdaNgR823BmqPihuUjPSyvCg=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBplECJGPIaTD783PRTfVgJdYa5+qi82Ix9SRBSJ FXoVzz+hfqJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCaZRAiQAKCRBVnxHm/pHO 9TqUCACAkMlYjYzu3Cpq8XdMbIOgBAL7h7hf5td1dFYNIvr3Xf0U5DJYlzpsePy/2sYWeHwpZDU zbFPGcUbfGtmouqA66H8m61Uq+oRLBToNrcXkvYCZdc15zboj7gArP0RyeKz/4CLlE5v7fg8zYm Qx8caf+bhwYTNg1ZvKWmtmC/sroFxtatru8bFbQz/5wbHDcdVJNx7iQ0zetrL6T+A+zjP2WXlAx rHyU7gVEPgPVjjdj9IyAAEHufMdZUGGP+8LhfgtQrb9a9fsCUHemnaCS3W+774FWPxAGzJhU9X/ WzUGwYplXsi8+Vy7RMEJ1UmBX73pqZIdD9rNH2Q1WuRudMPS X-Developer-Key: i=manivannan.sadhasivam@oss.qualcomm.com; a=openpgp; fpr=C668AEC3C3188E4C611465E7488550E901166008 X-Endpoint-Received: by B4 Relay for manivannan.sadhasivam@oss.qualcomm.com/default with auth_id=461 X-Original-From: Manivannan Sadhasivam Reply-To: manivannan.sadhasivam@oss.qualcomm.com From: Manivannan Sadhasivam If OF graph is used in the PCI device node, pwrctrl core currently creates the pwrctrl device even if the remote endpoint doesn't have the power supply requirements. Since the device doesn't have any power supply requirements, there was no pwrctrl driver to probe, leading to PCI controller driver probe deferral as it waits for all pwrctrl drivers to probe before starting bus scan. This issue happens with Qcom ath12k devices with WSI interface attached to the Qcom IPQ platforms. Fix this issue by checking for the existence of at least one power supply property in the remote endpoint parent node. To consolidate all the checks, create a new helper pci_pwrctrl_is_required() and move all the checks there. Fixes: 9db826206f9b ("PCI/pwrctrl: Create pwrctrl device if graph port is f= ound") Reported-by: Raj Kumar Bhagat Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bartosz Golaszewski Reviewed-by: Krishna Chaitanya Chundru Tested-by: Raj Kumar Bhagat --- drivers/pci/pwrctrl/core.c | 47 +++++++++++++++++++++++++++++++++---------= ---- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c index 6f7dea6746e0..8325858cc379 100644 --- a/drivers/pci/pwrctrl/core.c +++ b/drivers/pci/pwrctrl/core.c @@ -268,6 +268,39 @@ int pci_pwrctrl_power_on_devices(struct device *parent) } EXPORT_SYMBOL_GPL(pci_pwrctrl_power_on_devices); =20 +/* + * Check whether the pwrctrl device really needs to be created or not. The + * pwrctrl device will only be created if the node satisfies below require= ments: + * + * 1. Presence of compatible property to match against the pwrctrl driver = (AND) + * 2. At least one of the power supplies defined in the devicetree node of= the + * device (OR) in the remote endpoint parent node to indicate pwrctrl + * requirement. + */ +static bool pci_pwrctrl_is_required(struct device_node *np) +{ + struct device_node *endpoint; + + if (!of_property_present(np, "compatible")) + return false; + + if (of_pci_supply_present(np)) + return true; + + if (of_graph_is_present(np)) { + for_each_endpoint_of_node(np, endpoint) { + struct device_node *remote __free(device_node) =3D + of_graph_get_remote_port_parent(endpoint); + if (remote) { + if (of_pci_supply_present(remote)) + return true; + } + } + } + + return false; +} + static int pci_pwrctrl_create_device(struct device_node *np, struct device *parent) { @@ -287,19 +320,7 @@ static int pci_pwrctrl_create_device(struct device_nod= e *np, return 0; } =20 - /* - * Sanity check to make sure that the node has the compatible property - * to allow driver binding. - */ - if (!of_property_present(np, "compatible")) - return 0; - - /* - * Check whether the pwrctrl device really needs to be created or not. - * This is decided based on at least one of the power supplies defined - * in the devicetree node of the device or the graph property. - */ - if (!of_pci_supply_present(np) && !of_graph_is_present(np)) { + if (!pci_pwrctrl_is_required(np)) { dev_dbg(parent, "Skipping OF node: %s\n", np->name); return 0; } --=20 2.51.0 From nobody Fri Apr 3 03:00:11 2026 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 D7542281532; Tue, 17 Feb 2026 10:18:51 +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=1771323531; cv=none; b=VmOufF+Ej2QtsjKeTlqxeiNWbjWqEdKydjiaCFeBHvkwogx1et1i88aH9VDpJbnmHKc4yrwGb98s7M1pYf+Cou6ZcoaRfli6y79dX0WwmNHdz0JMGIBQLKLiQ/vm8vo28mmYjV3Y330nMyRNBm+IC3hflzVd/ybHBA2plLTvCT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771323531; c=relaxed/simple; bh=+FvIOo6LaMp1nwA9zSJb2lGx0Ul6585dauW/Ve0I6mk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YwG09uTJJOKhluuvbTrZxS1UA8udo6GLHpW8Ss25pDfEK5RFE/JffFSNoJ8mOzrr6aKBGMDthjYL93qmIoD9eKY9ze8RUBlad7y65OEF1uc7RP6LjqVul/71ngacRXEZGmBxg5Fb6dJEq4z2M+KkikK/WjNC2M+yraY2F9mZoy4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NMf6YQrD; 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="NMf6YQrD" Received: by smtp.kernel.org (Postfix) with ESMTPS id A0AE6C19424; Tue, 17 Feb 2026 10:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771323531; bh=+FvIOo6LaMp1nwA9zSJb2lGx0Ul6585dauW/Ve0I6mk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=NMf6YQrDoQfqmjJ2yZ7fD2NOzKge4aBPHtJkwpiRBEAQsLumo1BGla4kSwq3uvfVK BFwhdZmf1M7vKA5XMACq0FijQVb0mLFaLQ2j6MqMUrqdsEL+H36Wmkm4A9n1xAIRAW 4KgaKqVPB2zhNJld75OctGPfe9lRwBtn7AdjzShMOFMDi5eBzxuJ2lkRfrKrDpB2oq Hla1K1kO4HpGFzov0YWK0phPZz7e7GbRfobLh/jyLZebcxIbRdr5xgpifyoX1dvddc NVD+cVHBhhBcLo34qAlsUrOQ63Eh674xPE0JtvVP412fT9uv0prZrXAwUhNhH2UUzg OgnJOEUzPTLHQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A87E68163; Tue, 17 Feb 2026 10:18:51 +0000 (UTC) From: Manivannan Sadhasivam via B4 Relay Date: Tue, 17 Feb 2026 15:48:47 +0530 Subject: [PATCH 2/2] PCI/pwrctrl: Only create pwrctrl device if the device node is of type "pci" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260217-pwrctrl-fixes-7-0-v1-2-b5671e58934f@oss.qualcomm.com> References: <20260217-pwrctrl-fixes-7-0-v1-0-b5671e58934f@oss.qualcomm.com> In-Reply-To: <20260217-pwrctrl-fixes-7-0-v1-0-b5671e58934f@oss.qualcomm.com> To: Bartosz Golaszewski , Manivannan Sadhasivam , Bjorn Helgaas , Krishna Chaitanya Chundru Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Manivannan Sadhasivam , Bjorn Andersson X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1885; i=manivannan.sadhasivam@oss.qualcomm.com; h=from:subject:message-id; bh=aNEcD1tWIRurJpHegw9tQESfw9DiViDCcnlJdYscw3w=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBplECJBvvbUtKjqgm7Y5/W5vm/aHOgtEqONDvkP l078hE72uCJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCaZRAiQAKCRBVnxHm/pHO 9Y+dB/9qein+EP7oXQE9zMgLPXSx0XxeSLsxXSKneM6oVh6c/ypC+5r3ahlhx1AcvSWrT0Zvl+K icHW2vegkchJe2pHv1YYPe5OvJlsn5rmSF5Sk/IoKJs4q5F+WIwlbg+pB9o8rR/HfDsWUM5/S2e 8lXc08sUyYAE7x5YsHsL3YNSkx1JQ0hPNIkh21k7Do5LIWyyWb1Xe6N7gwhudu3z+Cp/YIvckva NOAbFgNtINUWz28zMIGL317KwMdhZGhyFihxQKbE5BD96/oXxEUzuYgOzLvXdcapIURhJlOnvVS IhBA87WxKKlqX8xKU+UsIPszOX+wm1IPF+APCi4jJsRmNLpB X-Developer-Key: i=manivannan.sadhasivam@oss.qualcomm.com; a=openpgp; fpr=C668AEC3C3188E4C611465E7488550E901166008 X-Endpoint-Received: by B4 Relay for manivannan.sadhasivam@oss.qualcomm.com/default with auth_id=461 X-Original-From: Manivannan Sadhasivam Reply-To: manivannan.sadhasivam@oss.qualcomm.com From: Manivannan Sadhasivam The PCI host bridge node can have non-PCI child nodes as well, like OPP tables, USB controller node etc... So the pwrctrl core must check for the presence of 'device_type' property with value of "pci" to ensure that the pwrctrl device is only created for PCI device nodes. Fixes: 4c4132489201 ("PCI/pwrctrl: Add APIs to create, destroy pwrctrl devi= ces") Reported-by: Bjorn Andersson Closes: https://lore.kernel.org/all/20260212-rb3gen2-upd-gl3590-v1-1-18fb04= bb32b0@oss.qualcomm.com Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bartosz Golaszewski Reviewed-by: Krishna Chaitanya Chundru --- drivers/pci/pwrctrl/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c index 8325858cc379..7404d48427ce 100644 --- a/drivers/pci/pwrctrl/core.c +++ b/drivers/pci/pwrctrl/core.c @@ -272,8 +272,9 @@ EXPORT_SYMBOL_GPL(pci_pwrctrl_power_on_devices); * Check whether the pwrctrl device really needs to be created or not. The * pwrctrl device will only be created if the node satisfies below require= ments: * - * 1. Presence of compatible property to match against the pwrctrl driver = (AND) - * 2. At least one of the power supplies defined in the devicetree node of= the + * 1. Presence of 'device_type =3D "pci"' property to identify PCI node (A= ND) + * 2. Presence of compatible property to match against the pwrctrl driver = (AND) + * 3. At least one of the power supplies defined in the devicetree node of= the * device (OR) in the remote endpoint parent node to indicate pwrctrl * requirement. */ @@ -281,6 +282,9 @@ static bool pci_pwrctrl_is_required(struct device_node = *np) { struct device_node *endpoint; =20 + if (!of_node_is_type(np, "pci")) + return false; + if (!of_property_present(np, "compatible")) return false; =20 --=20 2.51.0