Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp754667ybg; Fri, 12 Jun 2020 13:50:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuRpSbeBxxWwg/S7c2PgsWi+bqu3pNLGRX/DNxsLY6nB4BYi3uzTINBgst91H0tY1H7QSS X-Received: by 2002:a17:906:2a4d:: with SMTP id k13mr15617932eje.253.1591995022339; Fri, 12 Jun 2020 13:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591995022; cv=none; d=google.com; s=arc-20160816; b=sny7JPZzWCXp2NJp3UCPXzvUYnD36OlvDdOz+93AByr+1DnQD6NlbrPRMpSCTaF4Cm W2/twLxKvkZZM0omxrSavatZLeJPGyx6PUSaZmooNr137gQ3my6fnU9X6um3hN4G2td+ EldnUPtB0xXHR8diJ0ky4NmjVedIaBvZvjgA2amhIf9TT/ac0mTNx8y+wNZK7mCVhO3h F8K/Yze2VW05uHgeF8FM7yRjIuW697jLiamDVS/KwvlbW4Jjgfsc95F8GF1gqyFzx0Up Rcds1UXWlsoW8qtOQ7NO74L2oR8sVYB2YFNXiKEtTzwPuQcWqvh+dQgKA/1bOEMBtWyA q/Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=HA86HFkMVZKYtNpQVpmAKGtfPuWg6baMjjaO3Cpky10=; b=Y87qJEF3dyl/PKJal+qFsuAwy4M8FF8pxshFvox0XrV4+nyZt2cqhZH2T5ioAyzZau PiAdxxBoFitHszdxtLhp05sOe6SrbAhfRdiPPqzVLP6oOVH0T4wpCyHPMiCu9ikEk2oq AToZr9y/NoyuzeNKXRn4CHBo22sWBF4uCRs56LPz5PA2RaREhzInp63cLvuKI3cRjheb Q86p6PGUs7g0CUj2u3kI9lITnakIuhOfUJ4wxUevpzAtkgZUgyhpinlShPMXNHZaD7fK /zaMzbWU5T0o9X+I/nGsecujsxE2xseVJS0kpm4UmDLgZjwXuXF82jAIxBDTSudV/0yi bcvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si3090709edn.107.2020.06.12.13.49.59; Fri, 12 Jun 2020 13:50:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbgFLUsH (ORCPT + 99 others); Fri, 12 Jun 2020 16:48:07 -0400 Received: from mga03.intel.com ([134.134.136.65]:44482 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbgFLUsH (ORCPT ); Fri, 12 Jun 2020 16:48:07 -0400 IronPort-SDR: T7EW+TBF+4jkSITuM1sJRqvEMPMwoc5BeoBbSP7NiKovzhr0T1bzkpq2Ofz2pvO2K/iCn/46yh p7281TyMm5CQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 13:48:07 -0700 IronPort-SDR: LFgYyzHi1cf6/D4dh3wIX+ANgQ30imkG5tn9trlkftoohDgt4bJgNWyrwJyDfgLr3bATu/+5G8 CdBnIvZrXwzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,504,1583222400"; d="scan'208";a="307352135" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 12 Jun 2020 13:48:06 -0700 Received: from debox1-desk2.jf.intel.com (debox1-desk2.jf.intel.com [10.54.75.16]) by linux.intel.com (Postfix) with ESMTP id C7EDF5803C5; Fri, 12 Jun 2020 13:48:06 -0700 (PDT) From: "David E. Box" To: shyjumon.n@intel.com, rjw@rjwysocki.net, lenb@kernel.org, bhelgaas@google.com, dan.j.williams@intel.com, kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me Cc: "David E. Box" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org Subject: [PATCH V2 0/2] nvme: Add support for ACPI StorageD3Enable property Date: Fri, 12 Jun 2020 13:48:18 -0700 Message-Id: <20200612204820.20111-1-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200428003214.3764-1-david.e.box@linux.intel.com> References: <20200428003214.3764-1-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set implements a solution for a BIOS hack used on some currently shipping Intel systems to address issues with power management policy decisions concerning PCIe NVMe drives. Some newer Intel platforms, like some Comet Lake systems, require that PCIe devices use D3 when doing suspend-to-idle in order to allow the platform to realize maximum power savings. This is particularly needed to support ATX power supply shutdown on desktop systems. In order to ensure this happens for root ports with storage devices, Microsoft apparently created this ACPI _DSD property as a way to override their driver policy. To my knowledge this property has not been discussed with the NVME specification body. Though the solution is not ideal, it addresses a problem that also affects Linux since the NVMe driver's default policy of using NVMe APST during suspend-to-idle would lead to higher power consumption for these platforms. Patch 1 provides a symbol in the PCI/ACPI layer to read the property. Patch 2 uses the symbol in the NVMe driver to select D3 as a quirk if set. Changes from V2: - Export the pci_acpi_storage_d3 function for use by drivers as needed instead of modifying the pci header. - Add missing put on acpi device handle. - Add 'noacpi' module parameter to allow undoing this change. - Add info message that this is a platform quirk. David E. Box (2): PCI: Add ACPI StorageD3Enable _DSD support drivers/nvme: Add support for ACPI StorageD3Enable property drivers/acpi/property.c | 3 +++ drivers/nvme/host/pci.c | 14 ++++++++++ drivers/pci/pci-acpi.c | 59 +++++++++++++++++++++++++++++++++++++++++ include/linux/pci.h | 2 ++ 4 files changed, 78 insertions(+) -- 2.20.1