From patchwork Tue Nov 6 10:53:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 993586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BhEHqcl1"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42q5xr12vSz9sD4; Tue, 6 Nov 2018 21:53:36 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gJyzD-0001F4-Gc; Tue, 06 Nov 2018 10:53:31 +0000 Received: from mail-pf1-f196.google.com ([209.85.210.196]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1gJyzC-0001DR-8S for kernel-team@lists.ubuntu.com; Tue, 06 Nov 2018 10:53:30 +0000 Received: by mail-pf1-f196.google.com with SMTP id u10-v6so184646pfn.9 for ; Tue, 06 Nov 2018 02:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=SwaQUdCbeYjYU9qwfXpuI+ykmWvN/0tpO4Rql6CH1p8=; b=BhEHqcl1lvuSSDUdsdisHK0ZbO9owqtDt+1IGReC4pHqLvKqfX7xGvf+gVIE0FPjcw vfvL0SaY5vg2PD6FxPrztJr28gz3tt1rYsrDxiXJ7E/PwgOFRw7ZoTIUJDAJrTIGOoTb dM0VVm5LhzbcW0KMvV//fXRGW9/q275LptPjop0kZQBaWvvwTeK9wOdBAkgIjpf5u2X2 N5K/pKNfCm3efl3g4e0jIAgM2Nx13FL7fiJiyIDyaXE3hRl8FEYoqJnDgGNIJMp301Ky /pRUt+hbC3hN5IbkMSa9mECYNIOxHgdtoRo6XcJ4XvSt8/m6/aajjx1GPB0B6TIbRVEm 2uXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=SwaQUdCbeYjYU9qwfXpuI+ykmWvN/0tpO4Rql6CH1p8=; b=Dd4ZhVibN8GwZijfYBw7xmAI2Z4kQmUK+6tCM0NDjs1P9cw0fLPlu9YHfMSRzDVxD/ o8QtyaImi6xRylYJF1y0p26P7gHbQYmlZBIGSoomar58Oz9ZkViW6MrN0yJf4WNa97HU 60XKJ3UMyvgwAUTvf8nbKzfHzBzmKXM8rs8riNJNW2G1UtSIW9xmTLph9vSGIN+dVIzh g7BZAXklSIndhUAvkXnshqi7qgDSOh45M2/34dWS6dpOPb5e31uJVQLsw6RcOslwZh0P xhucpiYP1Hex1KnF9RAcKOr2pfXI/hmCA0OVy+VHUslIdoPdmHac8AU8p0+U/xVwjrcJ KRwQ== X-Gm-Message-State: AGRZ1gI1+E3JNMKMVdA7G7sh+88/SKiG2LnprRI9ou5Va5nRFoiHFYKE IAEx30oYWpGeUL1n1Uf8i/AAW2/t X-Google-Smtp-Source: AJdET5eaom3YlC0g/m2AFqTfEkDcT5ReIaqesNZqV0VxmMSd2b00NkyoctACvM3cwIuPSQwH/f9OMw== X-Received: by 2002:a65:4049:: with SMTP id h9mr23002396pgp.304.1541501608216; Tue, 06 Nov 2018 02:53:28 -0800 (PST) Received: from localhost (114-32-69-186.HINET-IP.hinet.net. [114.32.69.186]) by smtp.gmail.com with ESMTPSA id u19-v6sm74170803pfj.115.2018.11.06.02.53.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 02:53:27 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2][SRU][C] SAUCE: pci: prevent sk hynix nvme from entering D3 Date: Tue, 6 Nov 2018 18:53:13 +0800 Message-Id: <20181106105314.30069-4-acelan.kao@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181106105314.30069-1-acelan.kao@canonical.com> References: <20181106105314.30069-1-acelan.kao@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1801875 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. 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 f65fd0a067aa..56d9341822d1 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1338,6 +1338,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 bf85e152af05..8cb5dbeb5ed4 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -3084,4 +3084,6 @@ #define PCI_VENDOR_ID_NCUBE 0x10ff +#define PCI_VENDOR_ID_SK_HYNIX 0x1c5c + #endif /* _LINUX_PCI_IDS_H */