From nobody Thu Apr 9 14:15:03 2026 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 C650A230BE9 for ; Mon, 9 Mar 2026 01:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773018188; cv=none; b=jyOuIV0Ibm71pR/MAnZsO7XEWnWeUHdh9o3NWaQ8nLSz5uDAC7/h4ZbXzmk7vd5+cYk0tu54JqMDmEoUGVO7dynKjWmMrj7BzUCIalmVaXV7Ruclz80urFQ3Sk0j59qutQ/PgeHHwtjS8Qdta21MtMuTY2eHUhKIDmsxfvsi/sA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773018188; c=relaxed/simple; bh=1gflYDgP3JJy3XDGEY7mT1YcroKlO2WFBTsIAW5MLa4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nqZDru0tQ0oGTySlrjCf+fbpJuHvtkk6OpPlmMPEHaDwy4gzyvh6CeYYKA+45n6vgk/xIWnTFwd7P+6dSyS2AtPEcXa98vAhea4dJtMtDyMqsvyE+6udy2HJDR/DZKKsxIoO9jziORqugHRRgnnBCxp5l5UYTP8PU54QBPbAhIo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool; spf=pass smtp.mailfrom=packett.cool; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b=TaMCNiZR; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=packett.cool Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b="TaMCNiZR" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packett.cool; s=key1; t=1773018185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XDtPkp1DF65VL8O9lNO8R7JXpbFJd5I/n79YglPPSDU=; b=TaMCNiZRBJgZmWf0m/sn/U1YznnOzxHprYN6y4ahYcffd6ESjoVhR2k7W/TPbeEApNtX81 HmWsI55MolXFy4EUQWwt5C4KJJBzJMT5fQo42t+Vs7tHYm35/BDGqdECLuHwFDQybYKrXO 58VXab58pcBNVLOSV7baIqwc2Wx2QUaKR7LSaR7yWLwmWM9oYVkxOgkAP8dJjYpAOcNS9R 4JeQk2kpMPyi/YpUHqTQhOhGbLvVKsV0sMgh0IvXE4p2rX4jBk/WWdrdD6PYcq7fiHXH5/ B6kM0O3wyeYjTQqwiNqIFB+lgt7yP7h/72wodznU7Qgd2ZvehTSGDtvoWqDHng== From: Val Packett To: Bjorn Andersson , Michael Turquette , Stephen Boyd Cc: Val Packett , Konrad Dybcio , Johan Hovold , Manivannan Sadhasivam , Dmitry Baryshkov , Maximilian Luz , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] clk: qcom: gcc-sc8180x: Use retention for PCIe power domains Date: Sun, 8 Mar 2026 22:00:26 -0300 Message-ID: <20260309010214.224621-5-val@packett.cool> In-Reply-To: <20260309010214.224621-1-val@packett.cool> References: <20260309010214.224621-1-val@packett.cool> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" As the PCIe host controller driver does not yet support dealing with the loss of state during suspend, use retention for relevant GDSCs. This fixes the link not surviving upon resume: nvme 0002:01:00.0: Unable to change power state from D3cold to D0, devi= ce inaccessible nvme nvme0: controller is down; will reset: CSTS=3D0xffffffff, PCI_STAT= US read failed (134) nvme 0002:01:00.0: Unable to change power state from D3cold to D0, devi= ce inaccessible nvme nvme0: Disabling device after reset failure: -19 Fixes: 4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver fo= r SC8180x") Signed-off-by: Val Packett Reviewed-by: Dmitry Baryshkov --- In case [1] gets expanded to cover all SoC including this one, or an alternative solution ends up being implemented very soon (looks like it's not going to be [2]??), I can drop this here. [1]: https://lore.kernel.org/all/20260102-pci_gdsc_fix-v1-0-b17ed3d175bc@os= s.qualcomm.com/ [2]: https://lore.kernel.org/all/zfs6krk2whthgdjl2s2w4o5pjwimzw37afoiyrqlly= krk6jugt@4ijk5iqplohr/ --- drivers/clk/qcom/gcc-sc8180x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc8180x.c b/drivers/clk/qcom/gcc-sc8180x.c index b116a9c0b2d9..4095a1f54a09 100644 --- a/drivers/clk/qcom/gcc-sc8180x.c +++ b/drivers/clk/qcom/gcc-sc8180x.c @@ -4199,7 +4199,7 @@ static struct gdsc pcie_0_gdsc =3D { .pd =3D { .name =3D "pcie_0_gdsc", }, - .pwrsts =3D PWRSTS_OFF_ON, + .pwrsts =3D PWRSTS_RET_ON, .flags =3D POLL_CFG_GDSCR, }; =20 @@ -4226,7 +4226,7 @@ static struct gdsc pcie_1_gdsc =3D { .pd =3D { .name =3D "pcie_1_gdsc", }, - .pwrsts =3D PWRSTS_OFF_ON, + .pwrsts =3D PWRSTS_RET_ON, .flags =3D POLL_CFG_GDSCR, }; =20 @@ -4235,7 +4235,7 @@ static struct gdsc pcie_2_gdsc =3D { .pd =3D { .name =3D "pcie_2_gdsc", }, - .pwrsts =3D PWRSTS_OFF_ON, + .pwrsts =3D PWRSTS_RET_ON, .flags =3D POLL_CFG_GDSCR, }; =20 @@ -4253,7 +4253,7 @@ static struct gdsc pcie_3_gdsc =3D { .pd =3D { .name =3D "pcie_3_gdsc", }, - .pwrsts =3D PWRSTS_OFF_ON, + .pwrsts =3D PWRSTS_RET_ON, .flags =3D POLL_CFG_GDSCR, }; =20 --=20 2.52.0