]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: use host managed power state for suspend
authorKeith Busch <keith.busch@intel.com>
Thu, 23 May 2019 15:27:35 +0000 (09:27 -0600)
committerChristoph Hellwig <hch@lst.de>
Fri, 21 Jun 2019 09:08:38 +0000 (11:08 +0200)
commitf95338d9c7b314531a2adca6efeb11b4ccc0b8d8
treef2ea8685335294c5ea3e0e6053da188ece846117
parentfcdf30d213168e0d424a5309fd5df262148d543b
nvme-pci: use host managed power state for suspend

The nvme pci driver prepares its devices for power loss during suspend
by shutting down the controllers. The power setting is deferred to
pci driver's power management before the platform removes power. The
suspend-to-idle mode, however, does not remove power.

NVMe devices that implement host managed power settings can achieve
lower power and better transition latencies than using generic PCI power
settings. Try to use this feature if the platform is not involved with
the suspend. If successful, restore the previous power state on resume.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Mario Limonciello <mario.limonciello@dell.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
[hch: fixed the compilation for the !CONFIG_PM_SLEEP case]
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c