[RFC PATCH] nvme: add NO APST quirk for Kioxia device

From: Enzo Matsumiya
Date: Fri Nov 05 2021 - 22:09:19 EST


This particular Kioxia device times out and aborts I/O during any load,
but it's more easily observable with discards (fstrim).

The device gets to a state that is also not possible to use "nvme set-feature"
to disable APST. Booting with nvme_core.default_ps_max_latency=0 solves the issue.

We had a dozen or so of these behaving this same way on customer
environment.

Signed-off-by: Enzo Matsumiya <ematsumiya@xxxxxxx>
---
drivers/nvme/host/core.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 838b5e2058be..a698c099164c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2469,7 +2469,19 @@ static const struct nvme_core_quirk_entry core_quirks[] = {
.vid = 0x14a4,
.fr = "22301111",
.quirks = NVME_QUIRK_SIMPLE_SUSPEND,
- }
+ },
+ {
+ /*
+ * This Kioxia device times out and aborts I/O during any load,
+ * but more easily reproducible with discards (fstrim).
+ *
+ * Device is left in a state that is also not possible to use "nvme set-feature"
+ * to disable APST, but booting with nvme_core.default_ps_max_latency=0 works.
+ */
+ .vid = 0x1e0f,
+ .mn = "KCD6XVUL6T40",
+ .quirks = NVME_QUIRK_NO_APST,
+ }
};

/* match is null-terminated but idstr is space-padded. */
--
2.33.0