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 CD3A43783D0 for ; Thu, 5 Mar 2026 09:25:34 +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=1772702736; cv=none; b=SrdGaT5x75fwtOWCsGhqjPRg2S5OpaBCfm23BuA3Jff1P1biJGUH8MXz6rB3L5kW08E4NqviNv8+xBKp4FDVEBDr8MNsca/0ck8ibuzdgIh+3l2/ICgetATu9YtGpYsOXirzfPw6LTDH9K4HsdKgcPHCj+PoLhMZPCibOpx4Ltk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772702736; c=relaxed/simple; bh=/JCIQhJ7DqnlJxNz7YUsR6Ad68yHWeMmEyuU8m+NV5s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dt3Cz3aob8ZR8oWGdjF2Lx/mzlMHJEpw+hbNOavUFBfr2A12/8ERE/nLuXIYePDXHsdTXY6ZQgskxpBLt7Cktol9Y2FxHKPCFrS/mjB3OTWgi6YvEd+mir7Ayje89cmrnIxSFTl5vBKb7rDow8A+Tl2bSumAnvf6C1pHF4nAj8k= 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=ePdi+N8X; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JBoTXy18; 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="ePdi+N8X"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JBoTXy18" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6254ta8X218453 for ; Thu, 5 Mar 2026 09:25:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= YLqXdZqeswd7bsIzFoL7/R/GTqsNqM60xS7hO8DhIjg=; b=ePdi+N8Xes+9wQkc 6yZ0QDYqIIMXACoK9fbxHTQffU9rP2Wdo+80WOSu+U2NErCpzJN/hSdhQsp0V6X9 VjcUuG7wpMOAkMRs1eFiuNtjnUY9GSaIsCzQjN1JfUZ7oIKl+JaUybbkWHxN5rC+ h5G3frbFl8iNp7lwjvbqfEmNe/83Ru3KYiBNS14JCZ82a2GVnZkPl0p1kOclzf/s 4un5oWtnu9TmqYwDLBtDFt+f7LnFZQzthQZ+2wuoZFBfOwY7TM/9r60xkaMdlQy9 k9THT4tfBsGu0Ro5enixdKEFblCbGcTpSyZN+7m+gaoj1kwQy83UiiOKPUg7OTTh nBKCAA== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cq380rves-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Mar 2026 09:25:33 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8273937bfa8so3196683b3a.2 for ; Thu, 05 Mar 2026 01:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772702733; x=1773307533; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YLqXdZqeswd7bsIzFoL7/R/GTqsNqM60xS7hO8DhIjg=; b=JBoTXy187ZEwEh5r9si8nSsoJ2EkWfkDRQcbKxyruqCPwVq3nFEWGyoGAQpfI/LCD1 4A1iXtSDfogKAGA/9rZkaaSH7CSz8QxTXy9lJA9KMmPDh5x3LfVNc5OjNRrTFCZ5h39W eCv29O0AswXrHZoCDZgeKddaPEEKUDDUwgHNbs1a1nnQAOvIgcLkAjEyJf53+8H9FAZV pxmzcvonNk7dgBKeXgTA4FPy0RGLM2MwslJC7TlagcDDGvBokP0P/LQA/ak9s4aZDmFr /zQDuorVpZ+LOgHx7v6SYFIQAUQtWl03yk3sR0EZpixAruwq0DpypsLvKIGF365lQCfI 9ltQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772702733; x=1773307533; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YLqXdZqeswd7bsIzFoL7/R/GTqsNqM60xS7hO8DhIjg=; b=bqSsXUf2z2aX5d/EKr/RaPK1euZrfFjynCfgn8w05kq8aNWeHB63RARZYmG6GmPTyE wkNx0M/w1tyUewCAE8dpU+RIsD6aGxaKHXNsXarWKvWgj72NGXQkiAbb2YWvO46buUaO bqHL23LsDTvLtMVoFmCsyfwJJ/mY8Ct5gvBeEQ5zqva+AjPcUVT1TWAfo2mM6InXnD8i YKsX3PfFVFwkSVDkXD/Z0pxHMoIG7TVCjlb8FkgFSuQi2Z/bVhQdOdpvCNU05psusSG4 FalETSfTz9pv8E/dK+JaPpnd165zJimm1aVAl9ChhUxJVNhLys0lbNKfycHcIREv9KET JkQA== X-Forwarded-Encrypted: i=1; AJvYcCWkNGmYoIjSVW0WD4DBuc7D+WXiSWpNxcsx3KT+gHzACUHrC5HrC590P9Wos6nD/3mVfpaaMMU9fBfHUq0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5RcI6k82KUTQ9BkuPxGe4bHEG7FPYvWh53AO882pK3AJirjXu he1hUo4mGjLii2bb0hTCHjCRUcTgHFlwQHyw2ORD5kNEB7AggUmhmnnyV80MLQblxefELQiclnQ wSRM8dsnoZbH9KPFz8XZJi0/PTGkrh7B3Lt3cxFAL+5HWR/fK/Wx99uKgKT9ZX1WOLjg= X-Gm-Gg: ATEYQzyCLUSLEIjkPEKQuswTlKM438npwyhX16aBLgTcjPUbNjtUjJ+yZTq+c0kwDcz 4KVusLpxD/dIjtI9Wz/C/kv0veW/5qvXfOLoZxiGvDEhoKxiyQTP+yZ68gXPoCeAWzcFOFFpJ3x 3206OST2V0ZB24RgPTxed8JljexIs16Ha0glKS20UC3o1Inohd8wfo71q3uBbLn8YaLsK+kwtd+ 3TUCoG46DgJQM+24vm48HIq1i69n//vjzj48e/mYgX5bVKJi2WihTMGReX5H2RvfCebb+XDyfBk l6ILUZimPex4ZM/lGXT/H1/8DbsYb3cHnqdEOUupjve+t427cEqsomLnm9hMpkOwYtKOu20aflY KKKJngVz1dZ9t2AmJbniEzcMBTtTdHXe18UBPqH9mbzzyiX8tL7r3aQ== X-Received: by 2002:a05:6a00:1144:b0:81f:4a0c:c584 with SMTP id d2e1a72fcca58-82972b61defmr4432215b3a.1.1772702732590; Thu, 05 Mar 2026 01:25:32 -0800 (PST) X-Received: by 2002:a05:6a00:1144:b0:81f:4a0c:c584 with SMTP id d2e1a72fcca58-82972b61defmr4432193b3a.1.1772702732107; Thu, 05 Mar 2026 01:25:32 -0800 (PST) Received: from [10.218.35.45] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-829722d0045sm4521429b3a.23.2026.03.05.01.25.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Mar 2026 01:25:31 -0800 (PST) Message-ID: <9327c6a7-b2af-420d-bb1e-f2829ddaef7f@oss.qualcomm.com> Date: Thu, 5 Mar 2026 14:55:25 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/5] PCI: qcom: Add D3cold support To: Manivannan Sadhasivam Cc: Jingoo Han , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Will Deacon , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jonathanh@nvidia.com, bjorn.andersson@oss.qualcomm.com References: <20260217-d3cold-v2-0-89b322864043@oss.qualcomm.com> <20260217-d3cold-v2-5-89b322864043@oss.qualcomm.com> Content-Language: en-US From: Krishna Chaitanya Chundru In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=I5Johdgg c=1 sm=1 tr=0 ts=69a94c0d cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=uIgEQj9WjdynuVTCvEgA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-ORIG-GUID: EHX-jUWGTYheQyExNepRhXIuISCE1P00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA1MDA3NSBTYWx0ZWRfXw/JdwsA7Joo+ XIGhz5xzFUZlMNNJBtoMCm1er+H9MlSJVM3VBGmIejLhI3ZV4g9Eagx/YD8SI0zDFU/LDmJN8wR WtDxlULUl8oybNBqNoqzrq7hWWzDELPQxBYE9YoRIJoBTehpcGJHjFEmMpJITgsqhLfztskqUO5 27uBvnqdESqBDYPdJCgTGjqFQNaF1iQ9ot1d/S3sBt0Enhnaaz1TFiRJNoBYqi9sxRsGtl6eu0Z AXQROleoEXyJcU6FZawGLQ9wv5Q/j9cTEW4UNYomqdUuYer0Isyb25/t3uf8UTLDYV6RfdlVmyf 0Zgoh7vfCUuiQ9Z088l3q9rnjaBXLcD+VQ8FzJ1MqT0+zRKRyZxmioU7ahNIhSHiv5abw2X5eT9 zaV8X8mhsWlOOP1L1rmgNVXAoeccxntrUWRHwIL1tJnusHZn6VZRkM884w61hmVJ81REMdp2v0F GHjgOHY7DnKGXFFhdQQ== X-Proofpoint-GUID: EHX-jUWGTYheQyExNepRhXIuISCE1P00 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-03-05_02,2026-03-04_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 suspectscore=0 adultscore=0 clxscore=1015 impostorscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603050075 On 3/5/2026 2:44 PM, Manivannan Sadhasivam wrote: > On Thu, Mar 05, 2026 at 02:30:17PM +0530, Krishna Chaitanya Chundru wrote: >> >> On 3/5/2026 1:28 PM, Manivannan Sadhasivam wrote: >>> On Tue, Feb 17, 2026 at 04:49:10PM +0530, Krishna Chaitanya Chundru wrote: >>>> Add support for transitioning Qcom PCIe controllers into D3cold by >>> You cannot transition a 'PCIe controller' to D3Cold state, but only the >>> endpoints and bridges. >>> >>>> integrating with the DWC core suspend/resume helpers. >>>> >>>> Implement PME_TurnOff message generation via ELBI_SYS_CTRL and hook it >>>> into the DWC host operations so the controller follows the standard >>>> PME_TurnOff-based power-down sequence before entering D3cold. >>>> >>>> When the link is suspended into D3cold, fully tear down interconnect >>> You cannot suspend a link into D3Cold. Link and D-State are different. >>> >>>> bandwidth, OPP votes. If D3cold is not entered, retain existing behavior >>>> by keeping the required interconnect and OPP votes. >>>> >>>> Drop the qcom_pcie::suspended flag and rely on the existing >>>> dw_pcie::suspended state, which now drives both the power-management >>>> flow and the interconnect/OPP handling. >>>> >>>> Signed-off-by: Krishna Chaitanya Chundru >>>> --- >>>> drivers/pci/controller/dwc/pcie-qcom.c | 121 ++++++++++++++++++++------------- >>>> 1 file changed, 74 insertions(+), 47 deletions(-) >>>> >>>> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c >>>> index b02c19bbdf2ea5db252c2a0281a569bb3a0cc497..37442bbe588c36b0b0414cc4d0016da2d8424a87 100644 >>>> --- a/drivers/pci/controller/dwc/pcie-qcom.c >>>> +++ b/drivers/pci/controller/dwc/pcie-qcom.c >>>> @@ -145,6 +145,7 @@ >>> [...] >>> >>>> - if (pcie->suspended) { >>>> - ret = qcom_pcie_host_init(&pcie->pci->pp); >>>> - if (ret) >>>> - return ret; >>>> + ret = icc_enable(pcie->icc_mem); >>>> + if (ret) { >>>> + dev_err(dev, "Failed to enable PCIe-MEM interconnect path: %d\n", ret); >>>> + goto disable_icc_cpu; >>>> + } >>>> - pcie->suspended = false; >>>> + /* >>>> + * Ignore -ETIMEDOUT here since it is expected when no endpoint is >>>> + * connected to the PCIe link. >>>> + */ >>>> + ret = dw_pcie_resume_noirq(pcie->pci); >>>> + if (ret && (ret != -ETIMEDOUT)) >>> No, dw_pcie_resume_noirq() was reworked to return -ETIMEDOUT to indicate a hard >>> failure. If the device is not found, it will return -ENODEV. So you should >>> fail the resume if -ETIMEDOUT is returned. >> Ack, didn't noticed the reworked changes, I will change -ETIMEDOUT to >> -ENODEV. >> > No, that's what not I meant. I meant, you should do: > > if (ret == -ETIMEDOUT) > goto fail; there can be other failures also right, where we should fail, like pci->pp.ops->init(&pci->pp); can return different error other than -ETIMEDOUT in that case we should fail here. - Krishna Chaitanya. > - Mani >