Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1521720pxb; Wed, 2 Feb 2022 06:53:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJygaovprH3z2SQflsh56gXqkILZ2OV9rL3/rLl9QT6qIui0xGdlXrVyvxazilLqXzUOkJNY X-Received: by 2002:a05:6402:2071:: with SMTP id bd17mr30834387edb.330.1643813588949; Wed, 02 Feb 2022 06:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643813588; cv=none; d=google.com; s=arc-20160816; b=VdZqz1LoYGaNt7vI8KQWJRPf0Cww4jpX8ulodBDg8EiFrGf3AFdamnDrGujtdYWkyd vLrWDH0Vbe1pmfKb7mZAuE3Q/g47x3XThp5CS8JoKlL2Vk3CciBQ5YkHVQLIr38/ja+2 SNs+aK/3TVN2gln8KPgyLBzo8FdNHTaEX4J7m/pCS7f6HWUhwcmW32B2mRBDPGtXVT61 lYW9dJGGtiaWpDbNYYeCMf+XDu1hSH4zua4uydTqTWQflHmtUV/KZA9Av9a4kvoBKxWP /VX71pal32EqHj5yn9Bn8AYU4LaquhD4nOhkkyxaHRaxQ2cxPBQH+WwSo7wuuXfFh5C5 yamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TyShaFlwS4WJmA4J9+oEtW92bxfQHTiaWB5IObfbc5w=; b=Uq9bqBrZlx7xEL7KTU8pu6Wq3TYyWICO6kYJyiTYMReaxvKZ5T6jdd6EJInxFR2MDT vYajvJI4o8Z5S/5jbvweekFiE6U94cDZBpJiZOjIF+NOXYGoy0TS5ZMAOtfrCpGxrDkK kzaNvwbVbKNRJ4+EhGO5T5082rQXBoMRZCPYg5ueKojTx5H1NpCqNZMeNPNEDK7y6Ii+ AgKanB8f5RrauCdeikO9wstMiBSrEcDn99LXLYNN2uoIEUCfaOF1bcEWWmPDnQPw4N4y i6XYtJdO0kWdfZZ59XjnZMn/6HeL5ZkmTUyAV4tufDMd2Jtd25W1aQs1xgxW/OABCQNq 9zqw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14si10907650eda.257.2022.02.02.06.52.42; Wed, 02 Feb 2022 06:53:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240698AbiBARRN (ORCPT + 99 others); Tue, 1 Feb 2022 12:17:13 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:49504 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232616AbiBARRN (ORCPT ); Tue, 1 Feb 2022 12:17:13 -0500 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 4.0.0) id b96f82b7671223d4; Tue, 1 Feb 2022 18:17:11 +0100 Received: from kreacher.localnet (unknown [213.134.162.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 82F5966B3C6; Tue, 1 Feb 2022 18:17:10 +0100 (CET) From: "Rafael J. Wysocki" To: Vidya Sagar , Keith Busch Cc: rafael.j.wysocki@intel.com, keith.busch@intel.com, hch@lst.de, bhelgaas@google.com, mmaddireddy@nvidia.com, kthota@nvidia.com, sagar.tv@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Query related to shutting down NVMe during system suspend Date: Tue, 01 Feb 2022 18:17:09 +0100 Message-ID: <2616042.mvXUDI8C0e@kreacher> In-Reply-To: <20220201163054.GA2838889@dhcp-10-100-145-180.wdc.com> References: <65b836cd-8d5d-b9c2-eb8f-2ee3ef46112b@nvidia.com> <20220201163054.GA2838889@dhcp-10-100-145-180.wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.162.64 X-CLIENT-HOSTNAME: 213.134.162.64 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrgeefgdelkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepteeggfelteegudehueegieekveduleeuledvueefjeefffegfeejudfgteefhefhnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepvddufedrudefgedrudeivddrieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeivddrieegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeduuddprhgtphhtthhopehvihguhigrshesnhhvihguihgrrdgtohhmpdhrtghpthhtohepkhgsuhhstghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghfrggvlhdrjhdrfiihshhotghkihesihhnthgvlhdrtghomhdprhgtphhtthhopehkvghithhhrdgsuhhstghhsehinhhtvghlrdgtohhmpdhrtghpthht ohephhgthheslhhsthdruggvpdhrtghpthhtohepsghhvghlghgrrghssehgohhoghhlvgdrtghomhdprhgtphhtthhopehmmhgrugguihhrvgguugihsehnvhhiughirgdrtghomhdprhgtphhtthhopehkthhhohhtrgesnhhvihguihgrrdgtohhmpdhrtghpthhtohepshgrghgrrhdrthhvsehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhinhhugidqphgtihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=11 Fuz1=11 Fuz2=11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, February 1, 2022 5:30:54 PM CET Keith Busch wrote: > On Tue, Feb 01, 2022 at 09:52:28PM +0530, Vidya Sagar wrote: > > Hi Rafael & Christoph, > > My query is regarding the comment and the code that follows after it at > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvme/host/pci.c?h=v5.17-rc2#n3243 > > What I understood from it is that, there is an underlying assumption > > that the power to the devices is not removed during the suspend call. > > In the case of device-tree based platforms like Tegra194, power is > > indeed removed to the devices during suspend-resume process. Hence, the > > NVMe devices need to be taken through the shutdown path irrespective of > > whether the ASPM states are enabled or not. > > I would like to hear from you the best method to follow to achieve this. > > Since platform makers can't converge on how to let a driver know what > it's supposed to do, I suggest we default to the simple shutdown suspend > all the time. We can add a module parameter to let a user request nvme > power management if they really want it. No matter what we do here, > someone is going to complain, but at least simple shutdown is safe... Agreed.