Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1311924pxb; Wed, 2 Feb 2022 01:52:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJznGns3hVPzREdqSf5lb4++6vDmSuBEVHJaLk2pQO4Cyw0nf4ykJDLjhcrYrSBuJ7OBNqtd X-Received: by 2002:a63:c17:: with SMTP id b23mr23856629pgl.45.1643795578898; Wed, 02 Feb 2022 01:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643795578; cv=none; d=google.com; s=arc-20160816; b=KwHxaUqSQAu5+h+0nDYZZt7fBksEfzc9ZgMUZcJrMh4K5V4mkCAg8RFT0QMywt24sh tTyIYR9LzArXwb0OvbLZk0h+BsrzkhURMdKAj54gprfmujeex6Z1Kte8rnADCF1wFsyV 5A3V4CoOvnz0E9XU3h2ageOFxjNCk052kl6r2s4wWhAP/iREgXEPQPsrNMJQACHNl9s9 K+cVSWbEj1asFPuyb+kgXyYZPs5O66WbOU0XHNW73QqrVzwae1iE18Qez9otXW/zrs9P GMAqBfPxs9k9OJkpwlbuPx6sycL1UavtxiH1WRsQxhocRWsP9c5Q6eOe/bJZ4iEI2djH rpxg== 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=/yT1JZvegKW1MyKD91MJ9p4u5BE7z3ofyXc/9/K/Ktg=; b=tz8NCtPAwTze5hvKEBKBK7hvk9pJLL5Hg2AZnw45xX9/VXQflM49jlZp+Ru0onsdEz SOzMp7WgYFpSdaNonV7oHjr7/XDdcEbw04/I0TRZMTkXauVskR+MdOO4h5yV/PbxOSOW WDtpo28HuE3Bn7oPYjgyV1i6RNe2T+W4Op6wN9ruppV+yNQfX5azU9T2pBRgd4vcabfW 5Bw6+BtNRmH6sLLiGRD1tTQjdPixaXRq/IHXDTn8AUk5ZCdiJdolIU+GRTzS3EXAzB+O EQ8d7Mu51navrvQYZYItjpg39t5+KD6X55DAVNtb4pZnZsWssAB8Ni2/TFX1DcwyU46G C3nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rD1j4jKi; 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 y30si17444952pfw.277.2022.02.02.01.52.46; Wed, 02 Feb 2022 01:52:58 -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=rD1j4jKi; 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 S241107AbiBAQa7 (ORCPT + 99 others); Tue, 1 Feb 2022 11:30:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241103AbiBAQa6 (ORCPT ); Tue, 1 Feb 2022 11:30:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F80CC061714; Tue, 1 Feb 2022 08:30:58 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 0F4546172E; Tue, 1 Feb 2022 16:30:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7693C340EB; Tue, 1 Feb 2022 16:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643733057; bh=/yT1JZvegKW1MyKD91MJ9p4u5BE7z3ofyXc/9/K/Ktg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rD1j4jKioal/7gTCvwwEHY10EsDwjLXX97TBL84SR/bOZtmevYIKvZOMPYn7Z7t6w 4qmYz38C7xdddgYUipGFZag4D2FkQS1wYGXqKWrCIdYLEQUY2v+0Zpx66sKgZNTlnV JVvgDcTNwDFgXzQcVWvvFVccR/FMgBXfFuAznNbp3Ai89PZbUFABqHMMmQ0Zf3YNC9 fg4nU4gsg81IvGn+geFssfBDXaD+f4n2Zfdy01zxxIKGnamoBTQvdFuTUpGAsEWfhM inT9C9nPYNkne6QZiup1M9Wlu5l+ZIzNVwKXRwEQFh0vfZX1uqb4uaTRu5kSqCP3X6 kZYB0lIaksAfg== Date: Tue, 1 Feb 2022 08:30:54 -0800 From: Keith Busch To: Vidya Sagar 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 Message-ID: <20220201163054.GA2838889@dhcp-10-100-145-180.wdc.com> References: <65b836cd-8d5d-b9c2-eb8f-2ee3ef46112b@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65b836cd-8d5d-b9c2-eb8f-2ee3ef46112b@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...