]> 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)
commit68e498ddad4356bf81c3f22a8a6453f150a10325
treef2ea8685335294c5ea3e0e6053da188ece846117
parentecbabb7e2f2878528686a6b05580065c8a942776
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