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 BA9973B388A for ; Mon, 24 Aug 2026 05:35:18 +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=1787549722; cv=none; b=lAyawUuMDzmdxpR9wI7jVMb9qboQEghpt7Q1VuIqo1H3AZhgR3p/BnG8wcMDsiPKmK48lczqUBqFzqEUB5/GFFy4lqFJgJSBr3ijxY2s5D5PD2Zv6h261DPKzZ+4he7VvwP+gCzV328NPyAj08PdKR/gMy1139FjaCWiUl8SgqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787549722; c=relaxed/simple; bh=Gr3j/bc4r8i0ncFhXrYatBEkauE3ZXxaz9dWnL/CP58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jvG5h1XZ2ehmHMe5mzkF2THgLPICAmso2ROyMQOajVnLUYwtRwS3XvAflsXbY+vz9HzUqRxMTQsXOHGpJbVEhK/9RRq75Rrh8btVTVzVNRn1jbuB9IM7FE/JnFp8JO8u1xLchswmrT5QFAJOvJdNRlBXOPd9Qv9v6fHYGwZVChs= 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=XLRkxMXE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RtQ5RWkD; 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="XLRkxMXE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RtQ5RWkD" 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 67O5RAx21574287 for ; Mon, 24 Aug 2026 05:35:17 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= G7gnxc0Y7AdzTUkeyoIh5jJdd1ZA5WK6Avh0PA7l99A=; b=XLRkxMXESNVs6pTJ DvBTXyVCIKFhhrx6KTOnyrkGvTEWyjKWDcviICjOhvFcYEzH2MI6iPl6F/XVWXJp fH4AJ4pIcQLx+9Luqe6MJSTg9nqtzuHlChXmyV7q1iFet1X0P/AtO+LNhUpk8UIz lX2NXbSS10s/1DRoBl8lvJNvn2cWjKdP1li6R9ZHKaU8SDIvrnCd2ZSSt2CI8CMf 20MEinB1o4S3t8dIh3TpV8WRxBVByl4iir3Euj/kMKON0xFFJlKzZP8BVQpTJPq8 wa2ndeo49WiFO9CMvQByc8bZ3tudz9jg42zAmgrMbgbE+W5+vS8EF4fGQMToCNFw g8tHAg== 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 4g7456wju6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 24 Aug 2026 05:35:16 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-385d2703b64so4359176a91.1 for ; Sun, 23 Aug 2026 22:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787549716; x=1788154516; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=G7gnxc0Y7AdzTUkeyoIh5jJdd1ZA5WK6Avh0PA7l99A=; b=RtQ5RWkDP7/Bs/N5B4NVC0NdgLYXWzRN0bpLFk2kisLUsbSnhhQ1QOXEOM+9FEPchH UMxj9TUtFfIYGm5xOMJxt87Cpmki+yidsVSrrRef+lCWELk93RqdDST1Ual7dEclrhxD /5Yhw7TjtMbLyhvbGy7AuoqkwkG0FClCa3Cd6HuNbTDw8SNA/fuG3vwDaPD+HDLOUjDu gNJI+gSGyWvP/peyLhpdELuJvj3p4L7Q7/no6Wbe3TFK5CpyjJ86kvU3RDI9K9uOFSak I/iVwIRsEV9WlZ6YisjK0yKMDCxsVK+KpjD8BlPhJVFSV0o/uvd/XnQCKilEutw4g2fG ycrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787549716; x=1788154516; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=G7gnxc0Y7AdzTUkeyoIh5jJdd1ZA5WK6Avh0PA7l99A=; b=FNfQA0o4wDlC4chOqChNXMf0mNy+iDmzpPbh2k9jSfptnU6MEN0W6c4caNLHDvu1j9 BfrygOK8WydGMPU8veXuF0B+2Ys9PQqbhpjjP61Xc4HTYf70cOHpoXHi5RhFeuXjhHqc 9JLVXhsbzJBCoWggqG3bH8RxXb2blrCYIRiXOVI+nwR/DfaJ4GXMjwUhA47P6hkU+Og0 eNiXO0O0oy3Lf81AnDCJNdW/M+w7N8USNx+/U7jX0phL22WYwtzvjmp34sZLqN5beGQL DpkmlSVuhY4NF/W0KyBYIAPg3Vel5BipL8iriQ3fqE9kktEjrGAzeRnWDWP36NSHV9bC mVKA== X-Forwarded-Encrypted: i=1; AHgh+RohW9cZoeAOemVhAXjjFh2mL+luHWeMsTiZeJyvH1/cZTOo44x+ogramEuZL+g00180iBzlyX7UklAEMUs=@vger.kernel.org X-Gm-Message-State: AFuF++nPzgOwDV4IQUBQ/ze0BGxGxQ0jGSYMfqVIkoX+DQb2ipGX8njE AhremKdMFR1a7gK0cQ35/H9RNHQR21vdejF56B59+vAfJ5nveOOw8SW51M40uG0l9JWKoZ3QuLJ YqlKRp41Ya6zlWKxWVp2IUuJp8oIcLwCI96PUfn3MNED9HzEFKO9V3cK7Tb+BkRdbH6k= X-Gm-Gg: AR+sD11RRNBd2b3ZSB5Fr3YNJ476TnAOMF6vgU9ezqCG+q0i1vqI/WjvPqh1duXVMyk 1RjpbmEMTlX7tALYClv9nTpX9cw+mizXuhYQU3X9JW5bVxn5aTv00DvVqzF4uN270mQuYAZyM49 MUf0cODsbbEOTlDyE/DrhnfsqjJE0TH0Zq5WFu6tLViGufem1Az4WJt59cWdCo4k4WsILzpNsQE LeU3Yy0y2TRkbA2DlxJr8JAqlFUBpl4DDcnbzyIXqJcyJj0eO/0TFX7l9XVMVNk7QdyAF69DTdJ pVB3/Q9UTunBj+DjXU2V3WFw/7DYzmvpfut9FMK+ek5CLO3ocpLy4cExBfLoa5J9HO5oFdVeaaa rnDnX+dvEG3r7w+SIFNCrIQwSeNZMvxuTSxs= X-Received: by 2002:a17:90a:d40e:b0:38f:a81:15b1 with SMTP id 98e67ed59e1d1-395a071b857mr37436817a91.19.1787549716011; Sun, 23 Aug 2026 22:35:16 -0700 (PDT) X-Received: by 2002:a17:90a:d40e:b0:38f:a81:15b1 with SMTP id 98e67ed59e1d1-395a071b857mr37436750a91.19.1787549715545; Sun, 23 Aug 2026 22:35:15 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-327ff728ca7sm20166492eec.3.2026.08.23.22.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 22:35:15 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Mon, 24 Aug 2026 11:05:00 +0530 Subject: [PATCH v3 2/2] PCI: qcom: Implement shutdown() callback 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 Message-Id: <20260824-shutdown-v3-2-81c14bb7a1af@oss.qualcomm.com> References: <20260824-shutdown-v3-0-81c14bb7a1af@oss.qualcomm.com> In-Reply-To: <20260824-shutdown-v3-0-81c14bb7a1af@oss.qualcomm.com> To: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Krishna Chaitanya Chundru , Manivannan Sadhasivam X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1787549703; l=1611; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=0cHTaxCZhYijIaWac3FDVreKAhduxOIxg24XX1VGE0w=; b=La6xvZgrg53OkQBdhXJXN3dWr7kVxRj/tk2n1HR8Vs6RVyUql38BNbLRgN8czTXxn0bR/oo0B 9nVL6LA8o4ZBkD1u2m7iFDbNqRb7fhKUYf6w91MndAR8I/MTcDroyL4 X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Proofpoint-Spam-Info: AW1haW4tMjYwODI0MDA0NiBTYWx0ZWRfXxdxTL27zk2Ro Vis35/5eZ5gAtdxqrKfbEKAol3AcQLWbA7u3+2SIqoztogZmzj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Proofpoint-GUID: fcoQ6Ri_wCdeWHjSvplBnUSSuHAZa-di X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-24_02,2026-08-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 adultscore=0 malwarescore=0 phishscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608240046 From: Manivannan Sadhasivam PCIe host controllers should bring the link down cleanly before system shutdown/reboot proceeds to remove power/clocks from the controller. Without this, the link may still be up and endpoints still have transactions in flight when power/clocks are cut, which can trip SMMU translation faults or NoC protocol errors. Reuse dw_pcie_suspend_noirq() in the shutdown path to force the link into L2, putting it into D3cold. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krishna Chaitanya Chundru --- drivers/pci/controller/dwc/pcie-qcom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index d8eb52857f69..a4284c64de27 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -2156,6 +2156,17 @@ static int qcom_pcie_probe(struct platform_device *pdev) return ret; } +static void qcom_pcie_shutdown(struct platform_device *pdev) +{ + struct qcom_pcie *pcie = platform_get_drvdata(pdev); + + if (pcie) + dw_pcie_suspend_noirq(pcie->pci); + + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); +} + static int qcom_pcie_suspend_noirq(struct device *dev) { struct qcom_pcie *pcie; @@ -2337,5 +2348,6 @@ static struct platform_driver qcom_pcie_driver = { .pm = &qcom_pcie_pm_ops, .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, + .shutdown = qcom_pcie_shutdown, }; builtin_platform_driver(qcom_pcie_driver); -- 2.34.1