From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 B07D230F95B for ; Mon, 1 Dec 2025 12:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764593011; cv=none; b=pgd3c7W1/cpZYESFbAiyQUuw/tZj7wc3zYHHw1R3FYdKW0GYG55bdcuH6/tkDfMqZBGLbQCewp8ZoPgN2/DH0mUpLgVwZ0k0F6B5OSBeUSXlkRpF5u2cXz6E6eqCE26ZK9PX5NWQc9YWfa8fqYgSjNLazzkgNyIHKt5cpNi2lv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764593011; c=relaxed/simple; bh=pcAmflXBLmmiVoJCOG8vI54ZlYxumcRH+gZ9quI/3uc=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=QrY4UfowckzormrpV60XZNFdXxTXP72kQaVkZJeR+f2RIJXqnogJQwUTuzpc+VByk+/NyMZNvGwH8BqrpITUomX3qHPsyaUW4GM0pOojVKvCyQJkUVajPRjlE0VrXZ54CiT1tAwrLxvxfQ4/n3OPbktlXj2tjE0Xc3oaQVUvwds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=aIRYQvIt; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=W/pm3Fd0; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="aIRYQvIt"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="W/pm3Fd0" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B1B5lhr396873 for ; Mon, 1 Dec 2025 12:43:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=OpaVvLRzwNyUQHnkwzspQd lBGKDEqFvfhusWSTkPKsI=; b=aIRYQvItIVN6H7Rm22Diks4D2bBagGteD4OY9M 87t0BN05Tv8FwocgB6YkjPfCpa/WCGXBJkMpxNeBw+DAS/AHehA52463Q+zb2B+b nULQi+MiWKQsyjmb6jaFoYTyzVJ/KNUyZrjBkupvAwoyoNv+Cj7qzUyrfnO3VhAJ RnpDvsMNhyUNgniGK8tbR28JbeWpaWObLySCDgFAPsp26mSByJSnbuxDbXVJ1jl8 YylXM8wkXvP/wM0BHaZlwXn+KY1Ytgi8ebTfJYQanaSOdjtsO1OImbkHT4hyAmd6 xS78+yNi1iaZELj4eZBEl5bUaAmhkuE8RFo3i2x+Z8Ehc+Ag== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4as9ug08fy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 01 Dec 2025 12:43:28 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-3416dc5752aso10417211a91.1 for ; Mon, 01 Dec 2025 04:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764593008; x=1765197808; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=OpaVvLRzwNyUQHnkwzspQdlBGKDEqFvfhusWSTkPKsI=; b=W/pm3Fd0GYxOzC6NTQX6KeSx+rfvmyGHK0PkkOYk4dh8Z9U7mis0UVvEYOjj9CiJ7J uYXtqBktX2i46PyBRK30paB98ZsXO7cbxeEuuoNi3GQqyzlF199W9IhBqmF4efXv1wYx I2BxINq5le8zos21A1Z0SzY41gKzt6Pa94E2j/A517SLAxpadSXmHzjXOLyyVghkencb xfAWGR2BEHZL+2/Tw5FRsHkZMZVhYCJ7ZJGEvCf/Qg4MeLYNnilI3QE28L3PL1WrAPYx 5DDjVZzmA/IJEXALDNy5aKzilCKT6E0yub8jUZpnag+bVBQnrnwF1LudsMuuubK8P3QT Smcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764593008; x=1765197808; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OpaVvLRzwNyUQHnkwzspQdlBGKDEqFvfhusWSTkPKsI=; b=cxl5KaxGhaHWankSQH/IJ1kmzU8/edddryexpUT1zEztU4YfrqZCzUJwi5UWcPxJxY qH/OEpd8XvMKMidLl1beeKNKzhbv788kJJKnjSVDqKDFxrI0wkVVzdvcLQPViM+P1lCs Zka2whMTi5cjRDeZ4Mw0/qAO6awS50b4VDRSwm/JYCvUTvfJOKjRfVXjg8Ls8Mt2lueB 391chHevO1FXmYnEAtOQmHU2Bw3u4TONtLaXJJUfVcImccC02AS/B6P3dc/c+nktKIgi fEaobWKN1cCE5He5cd9e5lovKuN+tOskbvKGJwoNUY/+NH3FG8kct7a8Rjx+sUv+KviN xP4Q== X-Forwarded-Encrypted: i=1; AJvYcCW3bcV6wVTsO3Mt57dyqbzMQdRKnIm3f4rT2DzdcByT4IVx6cxhmD3VP907hq2e1tVUrtJw0rXJfhImBNc=@vger.kernel.org X-Gm-Message-State: AOJu0YxK9e3uxe6C3nDALrCvZnx/rYvizEjqrBtLSG/4AV3RVBQvxQvv LjpM1Vi2joUWY6lUhQePBJ5l4BAps+ScuMjd3B+BOoRjKlw3D16DMVDIuPUr8yn236UscAVZmjx fTDWx+rfuab5M5e+W4/KUeomotnKIMN2syBaR6PX4s3487uvVoOcaS9nvXP2kgpoEB3M= X-Gm-Gg: ASbGncu5z1kx95fKwlB702iB5DXehC9j7P771yPonFFsF4DkCoKL3zvyOhz/o7MijoF KFT7VeSj4BN29HHojW0eDi9b2POTC4J47n27khUHuHDYDxTCtrkktLbjJLf1At77bezzRCIhSt/ Nxvt8/4Y64CspfYPyk+KXmYEnDJ0tp3FYe3PTpuei2crSbVmU+90AiEljyrb1fax9Es+btsHPQp h5mSxt/mJZ5/sB7eIO6K1s1qF0wS7bdnu7duteE8Jb5eXNWHMcA09tXjd0YnlObrsXdq58jPEjb d9Leyq5B69cNsX39mYaznnjeGj3nnvTVD//WGsk9H5XfzRT+puB91G0j++Z/94hMhzMBxBHlMLo QTtSv16hYiS+XxboyK3Q7mwa3O8SfAh35EUQ73L9k3aES X-Received: by 2002:a17:90b:4d8c:b0:340:f422:fc76 with SMTP id 98e67ed59e1d1-3475eacec4cmr23965805a91.0.1764593007367; Mon, 01 Dec 2025 04:43:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEv8B/BJPSnkWjiTMb7xYIiTIMYZhhsAalx82O1NZpK1LC5SmZOTri+p5+kwNW6kRi3n2zqKA== X-Received: by 2002:a17:90b:4d8c:b0:340:f422:fc76 with SMTP id 98e67ed59e1d1-3475eacec4cmr23965790a91.0.1764593006781; Mon, 01 Dec 2025 04:43:26 -0800 (PST) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3477b733381sm13146374a91.12.2025.12.01.04.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 04:43:26 -0800 (PST) From: Krishna Chaitanya Chundru Subject: [PATCH 0/4] bus: mhi: Fix broken runtime PM design Date: Mon, 01 Dec 2025 18:13:16 +0530 Message-Id: <20251201-mhi_runtimepm-v1-0-fab94399ca75@oss.qualcomm.com> 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: 7bit X-B4-Tracking: v=1; b=H4sIAGSNLWkC/x3MQQqAIBBA0avIrBNSEKOrRITomLPQRCsC6e5Jy 7f4v0HFQlhhZg0K3lTpSB1iYGCDSTtyct0gR6mEkBOPgbZypZMi5si9NuiUtFYpDb3JBT09/29 Z3/cD48F2Gl8AAAA= X-Change-ID: 20251128-mhi_runtimepm-f7aed52cc557 To: Manivannan Sadhasivam , Jeff Hugo , Carl Vanderlip , Oded Gabbay , Jeff Johnson , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, ath12k@lists.infradead.org, netdev@vger.kernel.org, mayank.rana@oss.qualcomm.com, quic_vbadigan@quicinc.com, vivek.pernamitta@oss.qualcomm.com, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1764593001; l=2451; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=pcAmflXBLmmiVoJCOG8vI54ZlYxumcRH+gZ9quI/3uc=; b=slzoUkXd0LXre+U/uahaSU6CBfrkxDBvVi4QeGDQK13BAyAiueJULdaXVh7J25NweEqG9OK2p erBF5E42uRMAb3WmzCyUihVee/TDBYZ7B1BllpmT06WpiCHrcGUQ+TJ X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjAxMDEwMyBTYWx0ZWRfX77E5ZCOItE+L Wa6aa6+wrLfUeVa0/AA4RY8Ir0BSwZpk24J9TI7Y7zbVAFXXCvxBp3iL89Cmo6m5ZQXGvUV3+ch 4Aas0S/M1wB2t8F/+0aWu4BFYm+xkhz8hOf3ZNCIX3LzOsSnMmZSIYwo4kRvojnyEpKpRzKcPTM iD6OzLB4AIPxm1gvRsir7yzpeOVUfb1fiwF4iv/POvs0IBUfbGRislZiVIUzhGK7pXOvyi+MGF+ E4f3zB1lrn935K2O+KX+2yZp9v2MKvsIJuxGmcRBWrwgVLu0D+Y1uPHTugvytPdA8hKGUtwwB6u M5XU3kLR80taGif/H9i/s6TzNGkBDg22LUOJo9sksce3cDsZKOaF1M6mBzwVB4UquBHQiOk5HA5 jfMgqFu0h10ziWacyEa1RNg6ros3FQ== X-Proofpoint-GUID: DyGMm2x4ZTV2hqvVqin0-HZft8lSeyxF X-Proofpoint-ORIG-GUID: DyGMm2x4ZTV2hqvVqin0-HZft8lSeyxF X-Authority-Analysis: v=2.4 cv=EunfbCcA c=1 sm=1 tr=0 ts=692d8d70 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=Fm6EAR0vVewXWd2bb8wA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-28_08,2025-11-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 bulkscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512010103 The current MHI runtime PM design is flawed, as the MHI core attempts to manage power references internally via mhi_queue() and related paths. This is problematic because the controller drivers do not have the knowledge of the client PM status due to the broken PM topology. So when they runtime suspend the controller, the client drivers could no longer function. To address this, in the new design, the client drivers reports their own runtime PM status now and the PM framework makes sure that the parent (controller driver) and other components up in the chain remain active. This leverages the standard parent-child PM relationship. Since MHI creates a mhi_dev device without an associated driver, we explicitly enable runtime PM on it and mark it with pm_runtime_no_callbacks() to indicate the PM core that no callbacks exist for this device. This is only needed for MHI controller, since the controller driver uses the bus device just like PCI device. NOTE: As we have dependecies with other subsystems, Mani can you take these series through MHI tree if other maintainers give a ack for this series. To all the maintainers please ack to this series after reviewing so that Mani can take this through MHI branch. Signed-off-by: Krishna Chaitanya Chundru --- Krishna Chaitanya Chundru (4): bus: mhi: Replace controller runtime_get/put callbacks with direct PM runtime APIs bus: mhi: Remove runtime PM callback ops from controller interface net: mhi_net: Implement runtime PM support bus: mhi: Fix broken runtime PM design drivers/accel/qaic/mhi_controller.c | 11 ----------- drivers/bus/mhi/host/init.c | 1 - drivers/bus/mhi/host/internal.h | 7 +++++-- drivers/bus/mhi/host/main.c | 23 ++++------------------- drivers/bus/mhi/host/pci_generic.c | 24 +++--------------------- drivers/bus/mhi/host/pm.c | 18 ++++++++---------- drivers/net/mhi_net.c | 13 +++++++++++++ drivers/net/wireless/ath/ath11k/mhi.c | 10 ---------- drivers/net/wireless/ath/ath12k/mhi.c | 11 ----------- include/linux/mhi.h | 4 ---- 10 files changed, 33 insertions(+), 89 deletions(-) --- base-commit: ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d change-id: 20251128-mhi_runtimepm-f7aed52cc557 Best regards, -- Krishna Chaitanya Chundru