From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2AA6CFD35A for ; Mon, 24 Nov 2025 21:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=S235pCzFwW4cu3CnY1JnvmGV/B/AwvMB0CYA+CW14lI=; b=JLWo/Qny0pdm6t GhXK7kvIk3tREmeaeW5IJvddoX7sGaFLgBksAwkbZ4KaXZ+QsoETSGlp/RwBwA6B+QHYzAEIuseKw wrXfc9NAgToBNRwaggFkMunuiwWvk0u1yf9hFQyNsH6Lag8iUdXraLkkkV+kQiZM/fgYOJCRNK3Mg fFDEEfc2j+atOqqkU6ylS4oCGT7m8zul7DJ59waDvU3Y3MC5FtXYy4FEHUoNacPxmtkdoH3MpxSMu vqj1HBr1ZbOJhbERYHoFm1BVYfikY/W4LXSVsny3SR4tZNbQTtrRhyv480ynMSO6LtaWcSUCeFiLL xMVg4jy3XXvqyJ4i7+1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNe12-0000000CL24-1Z8a; Mon, 24 Nov 2025 21:22:32 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vNe10-0000000CL1R-14bp; Mon, 24 Nov 2025 21:22:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 2C11B43690; Mon, 24 Nov 2025 21:22:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDB27C4CEFB; Mon, 24 Nov 2025 21:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764019349; bh=RgrwDiinUzSpRqOGQiyfN+hRdSZO/OtpULDIPl/RaxE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qUnwH3pWJBpE5n0hprzgUyQmQnyYDnqdsNL/7ivetkau8W72rzPw6TL6kyAZV06Cx EESXAQ4m3JglpM69+IQcbANa/HFyP8qH9IXLwafZrKq+OV8OsiNXw7UDN2s3xWfS86 iq3U1hEgP0NdFE3xGqp8dkXzBpw21zocJN6AvpzNM2DQC4J5F8Y0wv+ajYA8mS1YIM NSphcDi7VxA//qJ0GbJa8B2of/bu+R600bs7kWLaj+FzTWGKztJcxFQqO5ST1vsMHv IH56mX+FT9s3Pcesq9w7rJJUrVxwhFgELcKZui4Ji52NlX0oO74l74Nq+azyLy8Ntb 49DxDSoqMqi4A== Date: Mon, 24 Nov 2025 15:22:27 -0600 From: Bjorn Helgaas To: Niklas Cassel Cc: Frank Li , Shawn Lin , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Heiko Stuebner , Kever Yang , Simon Xue , Damien Le Moal , Dragan Simic , FUKAUMI Naoki , Diederik de Haas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Fabio Estevam , Conor Dooley , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Hans Zhang , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de, Bjorn Helgaas Subject: Re: [PATCH v2 1/4] PCI: dwc: Advertise L1 PM Substates only if driver requests it Message-ID: <20251124212227.GA2713330@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251124_132230_354870_C6EC1E56 X-CRM114-Status: GOOD ( 30.14 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Wed, Nov 19, 2025 at 12:08:41PM +0100, Niklas Cassel wrote: > On Tue, Nov 18, 2025 at 05:34:18PM -0500, Frank Li wrote: > > On Tue, Nov 18, 2025 at 03:42:15PM -0600, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > L1 PM Substates require the CLKREQ# signal and may also require > > > device-specific support. If CLKREQ# is not supported or driver support is > > > lacking, enabling L1.1 or L1.2 may cause errors when accessing devices, > > > e.g., > > > > > > nvme nvme0: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0x10 > > > > > > If the kernel is built with CONFIG_PCIEASPM_POWER_SUPERSAVE=y or users > > > enable L1.x via sysfs, users may trip over these errors even if L1 > > > Substates haven't been enabled by firmware or the driver. > > > > > > To prevent such errors, disable advertising the L1 PM Substates unless the > > > driver sets "dw_pcie.l1ss_support" to indicate that it knows CLKREQ# is > > > present and any device-specific configuration has been done. > > > > > > Set "dw_pcie.l1ss_support" in tegra194 (if DT includes the > > > "supports-clkreq' property) and qcom (for cfg_2_7_0, cfg_1_9_0, cfg_1_34_0, > > > and cfg_sc8280xp controllers) so they can continue to use L1 Substates. > > > > > > Based on Niklas's patch: > > > https://patch.msgid.link/20251017163252.598812-2-cassel@kernel.org > > > > > > Signed-off-by: Bjorn Helgaas > > > --- > > > .../pci/controller/dwc/pcie-designware-ep.c | 2 ++ > > > .../pci/controller/dwc/pcie-designware-host.c | 2 ++ > > > drivers/pci/controller/dwc/pcie-designware.c | 24 +++++++++++++++++++ > > > drivers/pci/controller/dwc/pcie-designware.h | 2 ++ > > > drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ > > > drivers/pci/controller/dwc/pcie-tegra194.c | 3 +++ > > > 6 files changed, 35 insertions(+) > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c > > > index 7f2112c2fb21..ad6c0fd67a65 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware-ep.c > > > +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c > > > @@ -966,6 +966,8 @@ int dw_pcie_ep_init_registers(struct dw_pcie_ep *ep) > > > if (ep->ops->init) > > > ep->ops->init(ep); > > > > > > + dw_pcie_hide_unsupported_l1ss(pci); > > > + > > > > And, I don't think EP need clean L1SS CAP flags. If EP don't support L1SS, > > it should be force pull down #clkreq. > > I think the problem is that we cannot force pull down CLKREQ# in a generic > DWC function. That would have to be done in glue driver specific callbacks. > > Bjorn, perhaps we should simply drop the dw_pcie_hide_unsupported_l1ss() > call from dw_pcie_ep_init_registers(), and consider hiding L1ss for EPs to > be out of scope for this series. > > That way, we could still queue this series up for 6.19. > > Thoughts from everyone? Good idea, done locally, thanks! Bjorn _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip