{"id":2223169,"url":"http://patchwork.ozlabs.org/api/patches/2223169/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260414-l1ss-fix-v1-3-adbb4555b5ab@oss.qualcomm.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/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,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260414-l1ss-fix-v1-3-adbb4555b5ab@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-14T15:59:41","name":"[3/4] PCI: qcom: Indicate broken L1ss exit during resume from system suspend","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ffbcc79354548b01e55a0fdfc7a553c566b0030b","submitter":{"id":91277,"url":"http://patchwork.ozlabs.org/api/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/20260414-l1ss-fix-v1-3-adbb4555b5ab@oss.qualcomm.com/mbox/","series":[{"id":499863,"url":"http://patchwork.ozlabs.org/api/series/499863/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=499863","date":"2026-04-14T15:59:38","name":"PCI: Introduce pci_dev_suspend_retention_supported() API","version":1,"mbox":"http://patchwork.ozlabs.org/series/499863/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2223169/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223169/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pci+bounces-52511-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=sU694WY8;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52511-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=\"sU694WY8\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw8FC0wG5z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 02:02:55 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id D6D9A3081EAA\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 16:00:15 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BA7AD3ED13C;\n\tTue, 14 Apr 2026 16:00:12 +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 8C07A3ED12B;\n\tTue, 14 Apr 2026 16:00:12 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPS id 42B45C2BCC4;\n\tTue, 14 Apr 2026 16:00:12 +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 3612FF9D0E4;\n\tTue, 14 Apr 2026 16:00:12 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776182412; cv=none;\n b=dV/S/Env6lyVhsHa7ITWihb9QWBf8cXPShfHdRs4s9Po0lisvNBSYdONne61EvjeNgxGampP5Je0+dptNycn0/LK7rhGzU51+SywYceZVWOwqRGYnAVo/rIAR1khrf2tyB0ZKGd6RZtiF2Hg04ytrBJpMlQgwYR50wiYD0IO8do=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776182412; c=relaxed/simple;\n\tbh=pfNTF4MyP7MbmWdaazOq9QG/qOgjWorM7k/pjnsdDnQ=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=Df7JOJ1uBfwwK8h5GstVdzGFShYvjClA+WVmI6wD7O+KRhuLmf4Wws3hHnaS+b0JrSx/v3HA/JA18iljUWWoY3akb8qbCVkIJZ0RIDZEMqJSS3Mm3OjBA8NuvqYEIxqlBnyxPqGBnj6z315M8o/tNfmx6SgpIgI7daXGt6gIC9c=","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=sU694WY8; 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=1776182412;\n\tbh=pfNTF4MyP7MbmWdaazOq9QG/qOgjWorM7k/pjnsdDnQ=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n\tb=sU694WY8maCGvpsF2aPpm4jykA3aSkWrASj+i1wx4WXCaMBFa/Zp0bB/AwQCxS+lh\n\t QhDNbpEZKsjJO8i14ujORdg0B/cGIq7oQXTua+g4ufmC2XyAZ1gxxaXP8k6iPfmdeg\n\t UnWTzjH5eGd7ybatUXh7WFySJ2tFwsSxtMNI2QxdbKJDf1g5Ie7aNUdPx/2qTYAmzh\n\t z/ugqtiaApix27pRIyiV1Bp3C+dDpkIkwMRWVK5eOyx7CFjbdsVm/TlUC5xGZFwd/7\n\t NrFsmrkA7jnAjhsu/OGO12rjRDErQDO9q3g17ojFDcXBhzzufJyPnxfqK0F4ffIH1M\n\t 9wwhDXd4TJ+Mw==","From":"Manivannan Sadhasivam via B4 Relay\n <devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>","Date":"Tue, 14 Apr 2026 21:29:41 +0530","Subject":"[PATCH 3/4] PCI: qcom: Indicate broken L1ss exit during resume\n from system suspend","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":"<20260414-l1ss-fix-v1-3-adbb4555b5ab@oss.qualcomm.com>","References":"<20260414-l1ss-fix-v1-0-adbb4555b5ab@oss.qualcomm.com>","In-Reply-To":"<20260414-l1ss-fix-v1-0-adbb4555b5ab@oss.qualcomm.com>","To":"Bjorn Helgaas <bhelgaas@google.com>,\n  Manivannan Sadhasivam <mani@kernel.org>,\n  Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy?=\n\t=?utf-8?q?=C5=84ski?= <kwilczynski@kernel.org>,\n  Rob Herring <robh@kernel.org>, Keith Busch <kbusch@kernel.org>,\n  Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,\n  Sagi Grimberg <sagi@grimberg.me>","Cc":"linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n linux-arm-msm@vger.kernel.org, linux-nvme@lists.infradead.org,\n Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>","X-Mailer":"b4 0.15.0","X-Developer-Signature":"v=1; a=openpgp-sha256; l=2251;\n i=manivannan.sadhasivam@oss.qualcomm.com; h=from:subject:message-id;\n bh=4DYEP1zauw4orkCeJPQ0uZzhSR/jxYVrTX9FZ5rhz18=;\n b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBp3mSJljvX2vawbgDmc0ySB7J1BxqOQETumjAom\n wNG3QoD26iJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCad5kiQAKCRBVnxHm/pHO\n 9bvaB/4oVZcPWtoaiBUEUXLan1VGwV1vrK0hc99d4fh1ddJGcWisR+kxmzUyky+BJJpPBnoT3ef\n 5PeuljVd9HnNz+Nv+Ik5keS/N+FGKfZr9n7Cu4CLc472+00oPb8wnWxXWpa6/xhNe5G7iqCHSEn\n 6wYL5AtnXz4CL2zs+oZwk7xAf+DY3EkbrJlhxy6B2W9hBF+0ZK0Zw7zamLuLmgyRvKs07zOtkUf\n Y2arFkHTFH9deHbELWtMtHckak0wBO+opSqpprijj/g6iEVEpi/mFDIrxjZdwGuIce96deoHSYQ\n 8K/B2aQnL9YPi9b0KFoTmoCVyuNfaTCdhVKGKaQkMeuEmUeb","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\nQcom PCIe RCs can successfully exit from L1ss during OS runtime. However,\nduring system suspend, the Qcom PCIe RC driver may remove all resource\nvotes and turns off the PHY to maximize power savings.\n\nConsequently, when the host is in system suspend with the link in L1ss and\nthe endpoint asserts CLKREQ#, the OS must first wake up and the RC driver\nmust restore the PHY and enable the refclk. This recovery process causes\nthe strict L1ss exit latency time to be exceeded. (If the RC driver were to\nretain all votes during suspend, L1ss exit would succeed without issue, but\nat the expense of higher power consumption).\n\nThis latency violation leads to an L1ss exit timeout, followed by a Link\nDown (LDn) condition during resume. This LDn can crash the OS if the\nendpoint hosts the RootFS, and for other types of devices, it may result in\na full device reset/recovery.\n\nSo to ensure that the client drivers can properly handle this scenario, let\nthem know about this platform limitation by setting the\n'pci_host_bridge::broken_l1ss_resume' flag.\n\nSigned-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>\n---\n drivers/pci/controller/dwc/pcie-qcom.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)","diff":"diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c\nindex 67a16af69ddc..01afffd384f2 100644\n--- a/drivers/pci/controller/dwc/pcie-qcom.c\n+++ b/drivers/pci/controller/dwc/pcie-qcom.c\n@@ -1363,6 +1363,17 @@ static void qcom_pcie_host_post_init(struct dw_pcie_rp *pp)\n \tstruct dw_pcie *pci = to_dw_pcie_from_pp(pp);\n \tstruct qcom_pcie *pcie = to_qcom_pcie(pci);\n \n+\t/*\n+\t * During system suspend, the Qcom RC driver may turn off the PHY and\n+\t * remove votes to save power. If the endpoint asserts CLKREQ# to\n+\t * exit L1ss, the time required to wake the system and restore the\n+\t * PHY/refclk exceeds the strict L1ss exit timing, resulting in Link\n+\t * Down (LDn). Set this flag to indicate this limitation to client\n+\t * drivers so that they will avoid relying on L1ss during system\n+\t * suspend.\n+\t */\n+\tpp->bridge->broken_l1ss_resume = true;\n+\n \tif (pcie->cfg->ops->host_post_init)\n \t\tpcie->cfg->ops->host_post_init(pcie);\n }\n","prefixes":["3/4"]}