Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11828898rwl; Tue, 3 Jan 2023 05:27:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXtrERifG0gj1sIpIP6dL6ExNQr+l09RdQZxKTsEzqq7+tN5LesJzbuLDdFn1uPaUHlTo8Rg X-Received: by 2002:a05:6a21:32a1:b0:aa:6efd:1883 with SMTP id yt33-20020a056a2132a100b000aa6efd1883mr72105377pzb.37.1672752449444; Tue, 03 Jan 2023 05:27:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672752449; cv=none; d=google.com; s=arc-20160816; b=L5G9yelOMESZ1jjD7WsWUlr3aQDor0LT+5oG3NVYPnFNx0YZIeM508p4xHed6SsInQ 5FA2BhxO9/Vvp8sNn6r6ZCAKY+MsqBYEUNR9/6gGaD4hC41ruELP7TH4iYngpjtTkUkK WrXbP4EjYFdfsa5P0y5zrvErYPGn1GuH0i4KPaHbBr5Umz2c3vMP4/r1R0HLrJYlJw/I 22Y8TKvAAd5rjois+MBIqEwpeyUB0bHUbeD57EJJG2llioIvkPUr4sIs0hBlPw/RMXiX seekefE7ZraVJdlTz/QvEs391CyGbgGB/q/LxrRy0LISIz3ALIb7VExi9m/ZXWTFW7Xh KrAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/5koJTw4TDiYGz/aRl2BuBCYOg98Qo5uaSRdwls+5gQ=; b=a6Dg2M6fZ5FQDbZRc2+JLHnszwnMfUUN0pGvNgrqo4MoYTgzISi3NOUstN9EoJY47T JrKk7uIgaGCQcP4TCmFnbYVuUO7U/jfOQhA9lQHCcY9lV1kYDUmNLQYnMUeYPnTvLF/B aVc2cRTdZSw1EeKXJiYq+byL5LE70euMmAoSf73mA4pvk5wGrux3gRM+CmKiUVyOzQph o+AvKYf0pKJS2Nw06pZXY8rINcZRGLc9RdIzfUGDEG4xHe5F2ZULBE+W6YgtCu3PIuY6 QnwxNaztnqSWnKMei1McxkkrR8Beh8zrJ5LZcYACy0rbni56k8Xn8YL9AalYvMwroCea 2r6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CRLdGZGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a63e418000000b0045b22d763a3si31782090pgi.483.2023.01.03.05.27.21; Tue, 03 Jan 2023 05:27:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CRLdGZGF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbjACNR1 (ORCPT + 60 others); Tue, 3 Jan 2023 08:17:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237792AbjACNQ6 (ORCPT ); Tue, 3 Jan 2023 08:16:58 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE48A1146D; Tue, 3 Jan 2023 05:16:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 4A302CE10E4; Tue, 3 Jan 2023 13:16:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A30AC433F0; Tue, 3 Jan 2023 13:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672751788; bh=QzmSB4Fsa2kuyLrblpTp0oCbj0W8DeYw43TZjZaN4Fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CRLdGZGF9eUpt105J6xSrYRgx41Jqz85g4UZomuqwpvGcJa4EYWSGXRXhF55WYJcO n3XCV59CdzmzB39syIMbB4bCoVnD9FIQa9xqF7FYMrFvOL/kaR0cCLtP4O5iSwpmHQ /k4BpN8HAhhvlwpo8s+41PPsxPHKQmT8ysfcC/7/FsoRKBLO1lytXlpiVHhRzrM1Xo WJkoCDJASC8mWH8BgPt5gs0TrzjoviUPRF+VmvJQW/t58ENxbangFL++153ueWqjx2 ESw2KP3zrqE+WSOqZNaFlj/4l0mvst6H/6s4vqdAdU9LuTJWs+2tWIhxoQroQTFR+i iUEj43d6dk4yQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pCh9r-0002cH-QS; Tue, 03 Jan 2023 14:16:47 +0100 Date: Tue, 3 Jan 2023 14:16:47 +0100 From: Johan Hovold To: Manivannan Sadhasivam Cc: lpieralisi@kernel.org, robh@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_krichai@quicinc.com, johan+linaro@kernel.org, steev@kali.org Subject: Re: [PATCH 1/1] PCI: qcom: Add support for system suspend and resume Message-ID: References: <20230103074907.12784-1-manivannan.sadhasivam@linaro.org> <20230103074907.12784-2-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230103074907.12784-2-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 03, 2023 at 01:19:07PM +0530, Manivannan Sadhasivam wrote: > During the system suspend, vote for minimal interconnect bandwidth and > also turn OFF the resources like clock and PHY if there are no active > devices connected to the controller. For the controllers with active > devices, the resources are kept ON as removing the resources will > trigger access violation during the late end of suspend cycle as kernel > tries to access the config space of PCIe devices to mask the MSIs. > > Also, it is not desirable to put the link into L2/L3 state as that > implies VDD supply will be removed and the devices may go into powerdown > state. This will affect the lifetime of storage devices like NVMe. > > And finally, during resume, turn ON the resources if the controller was > truly suspended (resources OFF) and update the interconnect bandwidth > based on PCIe Gen speed. > > Suggested-by: Krishna chaitanya chundru > Signed-off-by: Manivannan Sadhasivam > --- > drivers/pci/controller/dwc/pcie-qcom.c | 52 ++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) I just gave this a quick spin on the sc8280xp-crd, and unfortunately this change appears to break suspend (e.g. hangs during suspend or resume). Setting a non-zero (250 MBps) peak bandwidth during suspend makes things work again. Presumably something is relying on these interconnect clocks to remain enabled. And isn't that expected as we need to set a non-zero icc bw to enable the interconnect clocks during probe? I'm afraid I won't have time to look into this for a while myself, but have you tried this on the CRD, Mani? One obvious difference is the modem on the CRD which I believe neither of our X13s have, but this seems like more of a general problem. Johan