Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7687010imu; Wed, 14 Nov 2018 23:18:48 -0800 (PST) X-Google-Smtp-Source: AJdET5fUiezmxDKmmvUdmRNd9dOr2bTXqZ2KHzjTjgINYZvansMh9/has/Wwv+zuzP0e/L9hrstw X-Received: by 2002:a17:902:102b:: with SMTP id b40-v6mr4419189pla.319.1542266328327; Wed, 14 Nov 2018 23:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542266328; cv=none; d=google.com; s=arc-20160816; b=aPiKUpPwJX2HEvubduKkzsTRwAODUUwSMrnXmcoYmuXlJUB3mwW42b13ib9cQADf+l 1MAlGMWEi+roiSMryk2UE7XfPnnz6TO8zQ1WG66MFsWIpcsx5vasI78J4IpZ2xHjXLm9 t5Pxj4p9HnKPEGL4XvSwFpPDfH9CM9FNuhDLscsPbCTmI4+xUEiNzBg0PklFv2xvA7Qr fyzWHD+EY5X+K1lz+cft6CVPfavWDazkNfeTVKQB2wGLsDJ75mdPYTgaL2cLnI9cOkJh PWsgfjTY7L4akiM6U1KGFv/GiLOAukrU+4pfeDTKSc34B7YzG/xkqMvGWwf1D7yJVFLD ur+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=QpY5H5crAjU/QhSBOs79qVZPo8+ju6Pxt8iUxx/YsW8=; b=C1+9s691wPvtNXLcY3D+SdrcyTDr2tcgVWSQwFV5FvDsSqhCDg0pqTc/F4pOFJZ/g5 u3x12opK0dU+8eyNdTZDlFbPbqePIFyX3eNe6CkiWzxpnaHQTAZk1GjDWoibF9V1k1Al TDzxizdXUhsKrvJdRyKd3M8dHmK6llJ9cOxEGw6HzJA8TJ0rbGrHMAXel13L9mjwIBuB hGyefjbnciZn4yR3ofuYOYbFfzgJ7HKIkDOBcjHHNk6Xfuck+Jr1llwoNWCOG5QMCECV vI+pzH2h3OG+sIojJIbqcbauGW6UDouRi+SCzsqBqAV3lTgq7jxGnMVLXqftq1AUriIr Hxow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si25815709plk.304.2018.11.14.23.18.32; Wed, 14 Nov 2018 23:18:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbeKORXQ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Nov 2018 12:23:16 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:33581 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbeKORXQ (ORCPT ); Thu, 15 Nov 2018 12:23:16 -0500 Received: from mail-pg1-f199.google.com ([209.85.215.199]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gNBtE-0004rl-1E for linux-kernel@vger.kernel.org; Thu, 15 Nov 2018 07:16:36 +0000 Received: by mail-pg1-f199.google.com with SMTP id r16so12420769pgr.15 for ; Wed, 14 Nov 2018 23:16:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2W7xYbcODO7ltm2wq3cZydoifQHDmmEc2h/HxX/70+A=; b=jRtG1N1pCVj+HuU7UKL/xFDpxFYWuCCs8VmYZA06qalcOYYv7zHGf3pKMpiyG1Hzn4 D96bJFHtKX0TYFttVXEmJ3rcOIuoDnFlo48KEj/qg+0MLbjqI5Dra5Sp0Kx3GIixKxtg U2E2H6scqv8Jn/V3qrbfnio04IJT7sKFyrl0/9sLyA9K5li9YqjqPaSYQlOj13fmuPLy qMYDLZc+zAnqfJSiBhGc2D5rgkqfHtb+kbbYeGyhV69NO2lYexa5QvEboqfgLwyreLFf 5IfQ2k1iQBKJuH5InaJfWr1KxLCOvN40x86OtvSSmaRH7AWPIlO24kUs2Fpf+ugnECSI JZrg== X-Gm-Message-State: AGRZ1gKL7IPLpLYbDVfWwfEFWDGs4c83AlIsNFsgAsrbWBeiJLyhQF0T wWXvxlsB/LMvTZhqJ9+szOs0oRv3hLOGhNnFdXcuzvQaKVvWuxLS3JfKuvlEyLPSzzaXOvcEZm6 e9RgzDXMN4u6k8RvPdccnJDjHJTeWCyQiDUlXoPumig== X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr4792082pgf.58.1542266194499; Wed, 14 Nov 2018 23:16:34 -0800 (PST) X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr4792060pgf.58.1542266194107; Wed, 14 Nov 2018 23:16:34 -0800 (PST) Received: from 2001-b011-380f-15ec-3d1a-6b7c-0c8c-d051.dynamic-ip6.hinet.net (2001-b011-380f-15ec-3d1a-6b7c-0c8c-d051.dynamic-ip6.hinet.net. [2001:b011:380f:15ec:3d1a:6b7c:c8c:d051]) by smtp.gmail.com with ESMTPSA id u13-v6sm23556095pgp.18.2018.11.14.23.16.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 23:16:33 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: [PATCH v2 1/2] pci: prevent sk hynix nvme from entering D3 From: Kai Heng Feng In-Reply-To: <20181109002157.GK41183@google.com> Date: Thu, 15 Nov 2018 15:16:29 +0800 Cc: AceLan Kao , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20181106071214.12745-1-acelan.kao@canonical.com> <20181109002157.GK41183@google.com> To: Bjorn Helgaas X-Mailer: Apple Mail (2.3445.101.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > On Nov 9, 2018, at 08:21, Bjorn Helgaas wrote: > > On Tue, Nov 06, 2018 at 03:12:13PM +0800, AceLan Kao wrote: >> It leads to the power consumption raises to 2.2W during s2idle, while >> it consumes less than 1W during long idle if put SK hynix nvme to D3 >> and then enter s2idle. >> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own >> APST feature to do the power management. >> To leverage its APST feature during s2idle, we can't disable nvme >> device while suspending, too. We have a new Intel NVMe [8086:f1a6] that has this “new” behavior. > > I don't know how APST works, but it sounds like you want to disable D3 > if you're using APST. But that's not what this patch does; this > disables it always. Ok, will work on a new patch that only disables D3 when APST is enabled. > > I'm not sure we want a quirk for this at all, since as Christoph > points out, it doesn't fix a functional issue as the other uses of > quirk_no_ata_d3() do. > > From your emails with Christoph, it sounds like this quirk is a > workaround for a firmware defect. If we *do* end up wanting a quirk, > the changelog should at least mention the firmware defect and maybe > check whether it has been fixed. According to SK Hynix folks and new evidence on the new Intel NVMe we have, this is something we are going to see more often. Kai-Heng > >> BTW, prevent it from entering D3 will increase the power consumtion around >> 0.13W ~ 0.15W during short/long idle, and the power consumption during >> s2idle becomes 0.77W. >> >> Signed-off-by: AceLan Kao >> --- >> drivers/pci/quirks.c | 1 + >> include/linux/pci_ids.h | 2 ++ >> 2 files changed, 3 insertions(+) >> >> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c >> index 4700d24e5d55..b7e6492e8311 100644 >> --- a/drivers/pci/quirks.c >> +++ b/drivers/pci/quirks.c >> @@ -1332,6 +1332,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, >> occur when mode detecting */ >> DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID, >> PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3); >> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SK_HYNIX, 0x1527, quirk_no_ata_d3); >> >> /* >> * This was originally an Alpha-specific thing, but it really fits here. >> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >> index 69f0abe1ba1a..5f5adda07de0 100644 >> --- a/include/linux/pci_ids.h >> +++ b/include/linux/pci_ids.h >> @@ -3090,4 +3090,6 @@ >> >> #define PCI_VENDOR_ID_NCUBE 0x10ff >> >> +#define PCI_VENDOR_ID_SK_HYNIX 0x1c5c >> + >> #endif /* _LINUX_PCI_IDS_H */ >> -- >> 2.17.1 >> >> >> _______________________________________________ >> Linux-nvme mailing list >> Linux-nvme@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-nvme