Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1561589pxb; Tue, 8 Feb 2022 22:21:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5ITd9YLzNDkKFr6kh91Iib1DJc3Wc0q3hHH16YD06YWYT2ReotBVS1G8trQ6Ndd7jzeBS X-Received: by 2002:a63:da0e:: with SMTP id c14mr738235pgh.598.1644387717877; Tue, 08 Feb 2022 22:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644387717; cv=none; d=google.com; s=arc-20160816; b=ZZieu0BlsXRSKGO8u6vaccVxq/lvSeOle4fXgP+ljMpmXzp0HBbyMhw9aB9Ukamplj B3RYtUP8zyIn8jyV76jT3C5TaAQBFX4H80ias88irQnLw0NmtAD1gdMgajBbOMyD+vrG 6scyKBAYb20lPG5eyD4BDG7cTbDajbG/IC0+IAN86RolGZVUyNtOrrf4Bk4PlemyWs1U ea9OqxwrXi/Eo+DtAF2ruWzEI3Kj+OSlOM436JwgL1dw7y6f5NimdPfoxAaAgLjZN6Vd I6N4g4vFcoPRX3hUQjFv9LLE55I5NjKAeOJ0rLYwU2tD4esBRYf0EIdNp3M1n2WY3VEk 804A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=0xBNTcGBAXWcoRI0B3peXkvckCYdilz2Av3IPGdz/44=; b=Ns4jsT+vg9sgGF5n1KenRFp/STNGOY47uPNfjkbn9bndLVad2ITcuElvKxCmZt48rT GKSSbLKPb0S+kfcPa3KnJ9Dj4WRLlVg2vo1AZaFYMArzQ1MCcyWPR4dMRKhvesmM+mRy tGtBvRQfOutHToBJQF7YYiPN5buMC64L4aL6EV95KPTB7K01/cScCnoFjmDOG59cUAXi HAtrpw7nL7oY8t8nhNF7HNpYTq5fp4jBCQC81jPlPhTeKWuVvideOKYq1+L8/PgbXxcI k5KrzDVxxa40fedTo/lTce2aTNk+OjgR4m+JVjHS+3JbZ1tJuBOy0qvNWJXhpgomWMVc yM2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=BxANQuNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bf2si13923060plb.440.2022.02.08.22.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:21:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=BxANQuNq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C05E9C05CB9A; Tue, 8 Feb 2022 22:02:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245552AbiBGLFU (ORCPT + 99 others); Mon, 7 Feb 2022 06:05:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233674AbiBGLDc (ORCPT ); Mon, 7 Feb 2022 06:03:32 -0500 X-Greylist: delayed 343 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 03:03:31 PST Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by lindbergh.monkeyblade.net (Postfix) with UTF8SMTPS id D82C1C043181 for ; Mon, 7 Feb 2022 03:03:31 -0800 (PST) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1644231811; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=0xBNTcGBAXWcoRI0B3peXkvckCYdilz2Av3IPGdz/44=; b=BxANQuNqiyPn5kLr1Tcrv6IlsW8q3jV3zrwl+Ay6+5/WV12fYRjnoD76mjwA4/j+G6oP0zVK 40PGuMIH61zaOAUIfDQZMz0/PML+MsAKAga+fCe0cCr2pt/IXrhjOIPxJ4bxsbOZ9eQ1oNNh WKkBqJ6bIGsIx0RrvY6B23fUNqg= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 6200fb2ae5522b2a16f4695f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 07 Feb 2022 10:57:46 GMT Sender: nitirawa=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D0836C4361A; Mon, 7 Feb 2022 10:57:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nitirawa) by smtp.codeaurora.org (Postfix) with ESMTPSA id E3C35C43616; Mon, 7 Feb 2022 10:57:44 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 07 Feb 2022 16:27:44 +0530 From: nitirawa@codeaurora.org To: Vidya Sagar Cc: Keith Busch , rafael.j.wysocki@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 In-Reply-To: <0bd9fdc1-99d4-1c59-7343-3708b331b2b5@nvidia.com> References: <65b836cd-8d5d-b9c2-eb8f-2ee3ef46112b@nvidia.com> <20220201163054.GA2838889@dhcp-10-100-145-180.wdc.com> <0bd9fdc1-99d4-1c59-7343-3708b331b2b5@nvidia.com> Message-ID: <24710253b2e34dfdd81ebe1f46b84652@codeaurora.org> X-Sender: nitirawa@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-02-01 22:28, Vidya Sagar wrote: > Thanks for the super quick reply and I couldn't agree more. > > On 2/1/2022 10:00 PM, Keith Busch wrote: >> External email: Use caution opening links or attachments >> >> >> 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... >> Hi Vidya, Are you planning to add module parameter based on above discussion. I see similar behaviour even with qualcomm platform. [ 119.994092] nvme nvme0: I/O 9 QID 0 timeout, reset controller [ 120.006612] PM: dpm_run_callback(): pci_pm_resume+0x0/0xe4 returns -16 [ 120.013502] nvme 0001:01:00.0: PM: pci_pm_resume+0x0/0xe4 returned -16 after 60059958 usecs [ 120.022239] nvme 0001:01:00.0: PM: failed to resume async: error -16 Regards, Nitin