{"id":2197183,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2197183/?format=json","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/1.0/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20260217-pwrctrl-fixes-7-0-v1-1-b5671e58934f@oss.qualcomm.com>","date":"2026-02-17T10:18:46","name":"[1/2] PCI/pwrctrl: Ensure that the remote endpoint node parent has the supply requirement","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d8853662753f83a1e9ce232432cf1e756950f02e","submitter":{"id":91277,"url":"http://patchwork.ozlabs.org/api/1.0/people/91277/?format=json","name":"Manivannan Sadhasivam via B4 Relay","email":"devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260217-pwrctrl-fixes-7-0-v1-1-b5671e58934f@oss.qualcomm.com/mbox/","series":[{"id":492406,"url":"http://patchwork.ozlabs.org/api/1.0/series/492406/?format=json","date":"2026-02-17T10:18:45","name":"PCI/pwrctrl: A couple of fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/492406/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2197183/checks/","tags":{},"headers":{"Return-Path":"\n <linux-pci+bounces-47438-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=borzDJbX;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-47438-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"borzDJbX\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFbGC0wyXz1xwR\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 21:18:59 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 7705D300C33C\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 10:18:55 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0778228D8D1;\n\tTue, 17 Feb 2026 10:18:52 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id D746526D4DF;\n\tTue, 17 Feb 2026 10:18:51 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPS id 912C2C2BC87;\n\tTue, 17 Feb 2026 10:18:51 +0000 (UTC)","from aws-us-west-2-korg-lkml-1.web.codeaurora.org\n (localhost.localdomain [127.0.0.1])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 82161E68161;\n\tTue, 17 Feb 2026 10:18:51 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771323531; cv=none;\n b=mtK8pCxB3j7PxQffjc9uV/T5+hTY+KXe6WsZXpSLUtJvdyj1MjpOBeO0SJu2vX6DlwPw5JiPkChUsI0nCVoaF13jBit8VLpe+B9se67kfJhfx9TjwVM2DBQBbJAyE/2voQNfHe4ShmfYelihalbblSAtMbmVyjIQgGbCG0HN8Tk=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771323531; c=relaxed/simple;\n\tbh=Q/zVyu7CI5pjjEHPGyvPCbmm2PQIolRXhxF5AltK8FU=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=bKHJg0yY+0lE57fzx6PmVINtYrX/pLWotw7Do5r6iJYAChujU4HqZFsjvOLv0T8E7i8Ez3/uCqtjRvudK7S+khJp+8/h5IF7ALKOMRx8Odvb2M1Ng76nJEw5jEA409TY6EsZ6NUCBGoZr3a8bVUYetTP6Y0p+LV4gHbnTPbDPf4=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=borzDJbX; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1771323531;\n\tbh=Q/zVyu7CI5pjjEHPGyvPCbmm2PQIolRXhxF5AltK8FU=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n\tb=borzDJbXL8vyBL1QANT9NL0X5BTmRMCGRZJAJolGg5neN0QGCW+mt71kOpfSizu8Y\n\t KNNsDndOigx0vfwa2BxaXMBTanFaxjTmZoa/oDdVMkQfCb0qLS5qRERlHn9s1i554D\n\t 6deyoU/KaQM489dcaEA6/vmHMfqOGm9mcPmGesRyEnd4Iq8ufvXfSEfwisMyZ7tEQv\n\t YvOdTRfcH85GKWk4rav2EU2OsxY7uHzWIbADkhFhTHEAhuBMIloPY+OI6snLUpbsdk\n\t VHrOYH6SqdwC4BmTciZqyWVlLVkEcs06IzWfkZVXkO2at49zQTfqRMZiuZDPICLPAf\n\t pzuNhNM3D8tGQ==","From":"Manivannan Sadhasivam via B4 Relay\n <devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>","Date":"Tue, 17 Feb 2026 15:48:46 +0530","Subject":"[PATCH 1/2] PCI/pwrctrl: Ensure that the remote endpoint node\n parent has the supply requirement","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","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 <brgl@kernel.org>,\n Manivannan Sadhasivam <mani@kernel.org>,\n Bjorn Helgaas <bhelgaas@google.com>,\n Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>","Cc":"linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,\n Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,\n Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=3183;\n i=manivannan.sadhasivam@oss.qualcomm.com; h=from:subject:message-id;\n bh=wlUdzqhUB+4RSVFnFt3JdaNgR823BmqPihuUjPSyvCg=;\n b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBplECJGPIaTD783PRTfVgJdYa5+qi82Ix9SRBSJ\n FXoVzz+hfqJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCaZRAiQAKCRBVnxHm/pHO\n 9TqUCACAkMlYjYzu3Cpq8XdMbIOgBAL7h7hf5td1dFYNIvr3Xf0U5DJYlzpsePy/2sYWeHwpZDU\n zbFPGcUbfGtmouqA66H8m61Uq+oRLBToNrcXkvYCZdc15zboj7gArP0RyeKz/4CLlE5v7fg8zYm\n Qx8caf+bhwYTNg1ZvKWmtmC/sroFxtatru8bFbQz/5wbHDcdVJNx7iQ0zetrL6T+A+zjP2WXlAx\n rHyU7gVEPgPVjjdj9IyAAEHufMdZUGGP+8LhfgtQrb9a9fsCUHemnaCS3W+774FWPxAGzJhU9X/\n WzUGwYplXsi8+Vy7RMEJ1UmBX73pqZIdD9rNH2Q1WuRudMPS","X-Developer-Key":"i=manivannan.sadhasivam@oss.qualcomm.com; a=openpgp;\n fpr=C668AEC3C3188E4C611465E7488550E901166008","X-Endpoint-Received":"by B4 Relay for\n manivannan.sadhasivam@oss.qualcomm.com/default with auth_id=461","X-Original-From":"Manivannan Sadhasivam\n <manivannan.sadhasivam@oss.qualcomm.com>","Reply-To":"manivannan.sadhasivam@oss.qualcomm.com"},"content":"From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>\n\nIf OF graph is used in the PCI device node, pwrctrl core currently creates\nthe pwrctrl device even if the remote endpoint doesn't have the power\nsupply requirements. Since the device doesn't have any power supply\nrequirements, there was no pwrctrl driver to probe, leading to PCI\ncontroller driver probe deferral as it waits for all pwrctrl drivers to\nprobe before starting bus scan.\n\nThis issue happens with Qcom ath12k devices with WSI interface attached to\nthe Qcom IPQ platforms.\n\nFix this issue by checking for the existence of at least one power supply\nproperty in the remote endpoint parent node. To consolidate all the checks,\ncreate a new helper pci_pwrctrl_is_required() and move all the checks\nthere.\n\nFixes: 9db826206f9b (\"PCI/pwrctrl: Create pwrctrl device if graph port is found\")\nReported-by: Raj Kumar Bhagat <raj.bhagat@oss.qualcomm.com>\nSigned-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>\n---\n drivers/pci/pwrctrl/core.c | 47 +++++++++++++++++++++++++++++++++-------------\n 1 file changed, 34 insertions(+), 13 deletions(-)","diff":"diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c\nindex 6f7dea6746e0..8325858cc379 100644\n--- a/drivers/pci/pwrctrl/core.c\n+++ b/drivers/pci/pwrctrl/core.c\n@@ -268,6 +268,39 @@ int pci_pwrctrl_power_on_devices(struct device *parent)\n }\n EXPORT_SYMBOL_GPL(pci_pwrctrl_power_on_devices);\n \n+/*\n+ * Check whether the pwrctrl device really needs to be created or not. The\n+ * pwrctrl device will only be created if the node satisfies below requirements:\n+ *\n+ * 1. Presence of compatible property to match against the pwrctrl driver (AND)\n+ * 2. At least one of the power supplies defined in the devicetree node of the\n+ *    device (OR) in the remote endpoint parent node to indicate pwrctrl\n+ *    requirement.\n+ */\n+static bool pci_pwrctrl_is_required(struct device_node *np)\n+{\n+\tstruct device_node *endpoint;\n+\n+\tif (!of_property_present(np, \"compatible\"))\n+\t\treturn false;\n+\n+\tif (of_pci_supply_present(np))\n+\t\treturn true;\n+\n+\tif (of_graph_is_present(np)) {\n+\t\tfor_each_endpoint_of_node(np, endpoint) {\n+\t\t\tstruct device_node *remote __free(device_node) =\n+\t\t\t\tof_graph_get_remote_port_parent(endpoint);\n+\t\t\tif (remote) {\n+\t\t\t\tif (of_pci_supply_present(remote))\n+\t\t\t\t\treturn true;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\treturn false;\n+}\n+\n static int pci_pwrctrl_create_device(struct device_node *np,\n \t\t\t\t     struct device *parent)\n {\n@@ -287,19 +320,7 @@ static int pci_pwrctrl_create_device(struct device_node *np,\n \t\treturn 0;\n \t}\n \n-\t/*\n-\t * Sanity check to make sure that the node has the compatible property\n-\t * to allow driver binding.\n-\t */\n-\tif (!of_property_present(np, \"compatible\"))\n-\t\treturn 0;\n-\n-\t/*\n-\t * Check whether the pwrctrl device really needs to be created or not.\n-\t * This is decided based on at least one of the power supplies defined\n-\t * in the devicetree node of the device or the graph property.\n-\t */\n-\tif (!of_pci_supply_present(np) && !of_graph_is_present(np)) {\n+\tif (!pci_pwrctrl_is_required(np)) {\n \t\tdev_dbg(parent, \"Skipping OF node: %s\\n\", np->name);\n \t\treturn 0;\n \t}\n","prefixes":["1/2"]}