-
由 Keith Busch 提交于
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: NKai-Heng Feng <kai.heng.feng@canonical.com> Tested-by: NMario Limonciello <mario.limonciello@dell.com> Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NKeith Busch <keith.busch@intel.com> Signed-off-by: NSagi Grimberg <sagi@grimberg.me> [hch: fixed the compilation for the !CONFIG_PM_SLEEP case] Signed-off-by: NChristoph Hellwig <hch@lst.de>
d916b1be