From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 B5FAC35E936 for ; Fri, 22 May 2026 10:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779444052; cv=none; b=FQfdv6lokhsphSxnSjtyC9fL7d2DVmvr+ZmLPaKjrnomVwZVtLEmEpDMj0Vei4il6jyOC53Fz4rLnn469y7e430RsEZdmT+ZOKbqejoImrGeCQHF9B/MoU5crTHOZap2brZHqCtOUYupYxnALxTHglKV1bRJNini+SU8fv9dsHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779444052; c=relaxed/simple; bh=+1xqvOBtTjhR467f4KD24eV71y2gTMox1bK7uo2F8/c=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=ZLnSUrykPz6KXUIpM07sEAMGlkprTRzcVleExD6R1jm3Dkf8a8kaw5V9KwZKXAc7/IE02bnwUmTK/QuDHFOZYfqnDxSa134wFaIdeg+vg/hhU1sRAcxpClV/EFw/z0bPa/RyamoNkCxLUh7Hhdo+I6M13liFxCnEfWNLOgbkp/k= 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=l/ENIXqk; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aaTYag30; arc=none smtp.client-ip=205.220.168.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="l/ENIXqk"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aaTYag30" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64M6lqcl1298254 for ; Fri, 22 May 2026 10:00:50 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=iuCxH5D+n2gNFhyOX5Y2of 7w5Zcuoea+gH2Rlo6K2Go=; b=l/ENIXqkelqIqqwXddP6me3HQDLOS3HeQ6XeQX LwNoPTpsDBSv5zrl2ik0fG6gITJ4e+6ClFp+6iaJWWX4u6U4ii/68Z2rW9B7WZ22 DFV/3IE1SXnSCUPZr3wiPDyH6bTDoVwEP7BjuW9mvpDpX8eLVcQ0ea/75QxDWDyn y19PwfJPx3RnVZvQxlxqFVCmDKC8VyrwzrytSsASaY+XKk7VtX8m6VjM1/lLT9rp c0pRLs7bh7cboj4U11RSyJOAIzkKgsD+x5KmXnN3deEvJkr7+5ZiNC8/L+R/nLlZ Uksb8TOeK7tqFoBFRRjmEs6rgmX5aNIiu3Jo+2/oKV+ddFbg== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eaah0adcn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 22 May 2026 10:00:49 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c8291230235so10806419a12.2 for ; Fri, 22 May 2026 03:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779444049; x=1780048849; 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=iuCxH5D+n2gNFhyOX5Y2of7w5Zcuoea+gH2Rlo6K2Go=; b=aaTYag30dPYuIpl2NOyGZLGtjt4qJ6VWLYxRa9JF2EXU1WWrKWzZBV9oN+CX4cuh3z TBA675nMC52WjZcam+Yj7V6W1i6SurCR57p6xUh6AqbHAmSITcNdV/WSB0EbV9f0sKem r+Gt13SQh5sSO0FNZeh/VctCr8Cfr4/2et29z0B5XRv+eKhUKo9uZLiK7sCuOul2STAj 9ImjAV/8kdF3/SfxRTQcBOuM5vnE8lOQCEzHWZ+lBets/fNqujXzK3w9pkj37bu/zfBp uoQ8Qs2o2k0ZSqDrGMUtNhLnt3eFStGiMhiXJt+T007t2ylL9kHb1/6SqRlf99SEXAik Amkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779444049; x=1780048849; 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=iuCxH5D+n2gNFhyOX5Y2of7w5Zcuoea+gH2Rlo6K2Go=; b=h/SkzZkcHyIdKZVROtfgRmhBe/C3s26prVDa/YWLD3tdpsS6varAlMW4Q4l1i4H56S nxJXfh5/2H6VZaVSLgRgZWWx48nwRhsrHLmozyoLUGTuBSTnmzdd/ltq/g547X9HHRvm 9SVM8nFJ1Fu0w3xRxJiAZaQ1zUJZNwHNHATAeM8BeMM4FjdCni6en0dEZUT9TKq1EI8V mupayOFp8vxV90K3rnNd/EqgUIEdoU5nRo3skaJ7ZciPPoOF4cGTf4cNv3txz6/r3Fuw 0LBSW3sJgERQMPbd2hS8ltSzvFZEXIXQ5PZP8IvlHx1ztHqXXItQqlTqwEXR0eoqrpuo 1c0g== X-Forwarded-Encrypted: i=1; AFNElJ9xwOTQvDYblSxvOZjJYUHt2W/f2YlMYRZpVbFW21idKtOYgb9m3i7yTAZwU8+0QkpHj41cRVkhG9aJjpU=@vger.kernel.org X-Gm-Message-State: AOJu0YyjkgNrmIIdYOoiVjgFhxFh0WkAVLaOi860UpFYfb0CFvvqw8bA 3wmHHP//ocTNBfwIMo7CSPCp55oAHjAJAiK1TReOhpL9XjfT5m1G3bG0aaA6l7UePRtVGomzp7O gpNgE/f+LHH+cPk1F0A2y0/+l64byVuFZGUvnxCJ4Gi+q26zJRh8CWoGoa9ZI4vSwnMo= X-Gm-Gg: Acq92OF44k5ysyguBouTCD0tpcGCDpnpJEJ/WTGt/AgZ/UPB5uQL1pYlt7JwVTMWfoZ BTg27SRgFDE4kyaP6O5oD3sjoiowbdHdI5eohRE3iw99NrnL/q/4LILaNYi5s1eCyhGZ66HJZWN gIOSKgyEC7bkOAj5Q6NALwT4h0HNm8+3/lmsf4UsfANnZ8DlABhRsrdDzVc/0mZakB7QJFB2m/0 NzwFq2AUrr+0KZBB+dlxlAnpzON/Xvg0sS4NvZpAPjgjIFcD6bIbAq/rwHXdaBseNJkP/Bm4yr6 EOm1gMF1FRG82VPovpMsN1hFp450JRwQRbzkX1LKu/2+zd9yusvRomuWaD/0HJkS4E6UxgFCQKP 1w8zNWsEt7SxyN+Kbsk+oBd1BEC1Ue3OA4s5T6MViED2TJu9x9S/9ugOL X-Received: by 2002:a05:6a00:3e01:b0:82f:1369:7268 with SMTP id d2e1a72fcca58-8415f5dcf42mr2983280b3a.30.1779444048764; Fri, 22 May 2026 03:00:48 -0700 (PDT) X-Received: by 2002:a05:6a00:3e01:b0:82f:1369:7268 with SMTP id d2e1a72fcca58-8415f5dcf42mr2983208b3a.30.1779444048116; Fri, 22 May 2026 03:00:48 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84164ac9b74sm1516641b3a.3.2026.05.22.03.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2026 03:00:47 -0700 (PDT) From: Krishna Chaitanya Chundru Subject: [PATCH v2 0/6] bus: mhi: Fix broken runtime PM design Date: Fri, 22 May 2026 15:30:31 +0530 Message-Id: <20260522-mhi_runtimepm-v2-0-fbebf41a82bb@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=H4sIAD8pEGoC/13MQQ7CIBCF4as0s5YGUFJx5T1MY5BOZRKBCm2ja Xp3se7cTPJP8r4FMibCDKdqgYQzZYqhhNxVYJ0Jd2TUlQbJpRJCHpl3dE1TGMnj4FnfGOyUtFa pBspmSNjTa/MubWlHeYzpvfGz+H5/kuTiT5oF46w3N33Ya21No84x5/o5mYeN3tflQLuu6wcpq 3SisQAAAA== 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 , Simon Horman , Loic Poulain , Sergey Ryazanov , Johannes Berg 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 , Konrad Dybcio X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1779444039; l=3236; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=+1xqvOBtTjhR467f4KD24eV71y2gTMox1bK7uo2F8/c=; b=iacSYbanGsCgJO+FPf6WYlX9gd+HwgLu3fqlbeWGrFLEf8k83HR9i9JLXwUGXl1VNyUq9NpK0 IN5Dw8Qus9yCJf1P0rKQA7/BzSTy5rzWWcg3vO/q5CYIoLB3Wz41hRb X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIyMDA5OSBTYWx0ZWRfX3Rup1b/tFgMr Q5n0PbIYGSpzst7hiAi310/XnPQO3eanu4MHH5JyVEJcnVKelKfgTHHqUhVHzLHo1lz51PphgJ0 VUOW27E/4DW9jt7aXs+WHl15a/P8pdQconHMm+3TU9t6lRq4/Oh12KNOlB87X7ZUdBT3LJYvaka 4Z46nDWL1nt8/g0ecfRA8Mpk4ZY+7snaareVfidOxaVb7iSoVlBt0p9+J26k/Ubhv5vUVhlT1yY UogRs55pRunLI0oGtzEPIkABdWCPXNG5zUKSh0ITlNfqpSjr1ZyVwxxwkzWs13GbQ2KUmtO6QrX 80mchnKPg2RF9gBxe70N48zoNbc8hbBxFJ9+4d2WDKhnpSJ2oFLI7lxeNyyCJFx0ok4SQ/hYE2u sDv8G4F8tILhYHaM2+vrp8xF7Y77xbA5JjkpztTmFeKOCMqppluBojDbxeOAYN6uyGKRdCJB/bB tS6NdDS7oo8kUoEvmhA== X-Proofpoint-GUID: -7K6L4NU0i3_SVQcXiRacAQEpLqnRaFJ X-Authority-Analysis: v=2.4 cv=LNdWhpW9 c=1 sm=1 tr=0 ts=6a102951 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KH93JrovTcJc50lypuwA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-ORIG-GUID: -7K6L4NU0i3_SVQcXiRacAQEpLqnRaFJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-22_02,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605220099 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 --- Changes in v2: - Rewrite commit messages (Bjorn Andersson) - Remove autosuspend and use normal runtime get/put API's as there is already autosuspend in controller driver which waits significant time. - Add pm_runtime_get()/get_sync() error handling. - Add rumtime pm for wwan and qrtr. - Link to v1: https://lore.kernel.org/r/20251201-mhi_runtimepm-v1-0-fab94399ca75@oss.qualcomm.com --- Krishna Chaitanya Chundru (6): bus: mhi: Replace controller runtime_get/put callbacks with direct PM runtime APIs bus: mhi: Drop controller runtime PM callback indirection net: mhi_net: Hold runtime PM during active data path operations net: qrtr: Hold runtime PM during active data path operations net: wwan: Hold runtime PM during active data path operations bus: mhi: host: Fix runtime PM ownership between clients and controller drivers/accel/qaic/mhi_controller.c | 11 ------- drivers/bus/mhi/host/init.c | 4 ++- drivers/bus/mhi/host/internal.h | 7 ++-- drivers/bus/mhi/host/main.c | 21 ++---------- drivers/bus/mhi/host/pci_generic.c | 24 ++------------ drivers/bus/mhi/host/pm.c | 18 +++++------ drivers/net/mhi_net.c | 39 +++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/mhi.c | 10 ------ drivers/net/wireless/ath/ath12k/mhi.c | 11 ------- drivers/net/wwan/mhi_wwan_ctrl.c | 60 ++++++++++++++++++++++++++++++++++- drivers/net/wwan/mhi_wwan_mbim.c | 44 ++++++++++++++++++++++++- include/linux/mhi.h | 4 --- net/qrtr/mhi.c | 57 +++++++++++++++++++++++++++++++-- 13 files changed, 216 insertions(+), 94 deletions(-) --- base-commit: a293ec25d59dd96309058c70df5a4dd0f889a1e4 change-id: 20251128-mhi_runtimepm-f7aed52cc557 Best regards, -- Krishna Chaitanya Chundru