]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/nvme/host/core.c
nvme: Adjust the Samsung APST quirk
[karo-tx-linux.git] / drivers / nvme / host / core.c
index 9583a5f58a1ddc498b89d1b6cbaa14cf1a60bea2..00b2818dac315bf5c35c9ec81856ebfaacc181bf 100644 (file)
@@ -1315,6 +1315,14 @@ static void nvme_configure_apst(struct nvme_ctrl *ctrl)
                        if (target)
                                table->entries[state] = target;
 
+                       /*
+                        * Don't allow transitions to the deepest state
+                        * if it's quirked off.
+                        */
+                       if (state == ctrl->npss &&
+                           (ctrl->quirks & NVME_QUIRK_NO_DEEPEST_PS))
+                               continue;
+
                        /*
                         * Is this state a useful non-operational state for
                         * higher-power states to autonomously transition to?
@@ -1387,16 +1395,6 @@ struct nvme_core_quirk_entry {
 };
 
 static const struct nvme_core_quirk_entry core_quirks[] = {
-       /*
-        * Seen on a Samsung "SM951 NVMe SAMSUNG 256GB": using APST causes
-        * the controller to go out to lunch.  It dies when the watchdog
-        * timer reads CSTS and gets 0xffffffff.
-        */
-       {
-               .vid = 0x144d,
-               .fr = "BXW75D0Q",
-               .quirks = NVME_QUIRK_NO_APST,
-       },
 };
 
 /* match is null-terminated but idstr is space-padded. */