[PATCH 0/3] [SRU Y/Z/A] APST gets enabled against explicit kernel option

Kai-Heng Feng kai.heng.feng at canonical.com
Thu Jun 29 09:59:18 UTC 2017

BugLink: https://bugs.launchpad.net/bugs/1699004

The NVMe driver doesn't set APSTE on APST quirked devices at initialization.
If the BIOS or NVMe enables APST before driver loading, APST will never be
disabled, it also ignores explicit kernel option as result.
So the faulty NVMe may not work as intended.

[Test Case]
$ sudo nvme get-feature -f 0x0c -H /dev/nvme0
...will show APST is "Disabled" instead of "Enabled"

Originally, APSTA is used to determined whether APST should be enabled or not,
but it actually means hardware support instead of APST enabled/disabled.
Separate the logic "apst is supported" and "to enable apst", so we can
use the latter one to explicitly disable APST at initialiaztion.

[Regression Potential]
Very low.
This SRU didn't change anything really - it just explicitly set APSTE at

Andy Lutomirski (2):
  nvme: Display raw APST configuration via DYNAMIC_DEBUG
  nvme: Add nvme_core.force_apst to ignore the NO_APST quirk

Kai-Heng Feng (1):
  nvme: explicitly disable APST on quirked devices

 drivers/nvme/host/core.c | 47 +++++++++++++++++++++++++++++++++++++++++------
 drivers/nvme/host/nvme.h |  1 +
 2 files changed, 42 insertions(+), 6 deletions(-)


More information about the kernel-team mailing list