Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BACKPORT: FROMGIT: 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. Cc: Mario Limonciello <Mario.Limonciello@dell.com> Cc: Kai Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Keith Busch <keith.busch@intel.com> (cherry picked from commit c5c4d7afac85501148c402bdc29397b77993cc36 git://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git nvme-power) BUG=b:127593309,b:134195632,b:134781711 TEST=Tested with LiteOn CL1-3D256-Q11 NVMe. DP/N 0TN2CC. F/W 22301100 Change-Id: Ic59f66ed916b8174b9ae50c29c0867b9e36f1124 Signed-off-by: Rajat Jain <rajatja@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1634069 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
- Loading branch information