]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-cli: Implement printing get NOPSC feature
authorRevanth Rajashekar <revanth.rajashekar@intel.com>
Wed, 13 Jun 2018 21:21:43 +0000 (15:21 -0600)
committerKeith Busch <keith.busch@intel.com>
Thu, 14 Jun 2018 22:34:53 +0000 (16:34 -0600)
Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
linux/nvme.h
nvme-print.c

index 62e18fc74ecf6c2bb48a87440cfa2d87ae8c02bc..8df72554cb10a1a5f7b89cd6f895a1bbd559f2ec 100644 (file)
@@ -858,6 +858,7 @@ enum {
        NVME_FEAT_TIMESTAMP     = 0x0e,
        NVME_FEAT_KATO          = 0x0f,
        NVME_FEAT_HCTM          = 0X10,
+       NVME_FEAT_NOPSC         = 0X11,
        NVME_FEAT_RRL           = 0x12,
        NVME_FEAT_PLM_CONFIG    = 0x13,
        NVME_FEAT_PLM_WINDOW    = 0x14,
index 37144ffbe00ca7506ac014d178847ea5e94499d6..8699d6ccc17b13b42a9616b285b856bacd069670 100644 (file)
@@ -1443,6 +1443,7 @@ char *nvme_feature_to_string(int feature)
        case NVME_FEAT_AUTO_PST:        return "Autonomous Power State Transition";
        case NVME_FEAT_HOST_MEM_BUF:    return "Host Memory Buffer";
        case NVME_FEAT_KATO:            return "Keep Alive Timer";
+       case NVME_FEAT_NOPSC:           return "Non-Operational Power State Config";
        case NVME_FEAT_RRL:             return "Read Recovery Level";
        case NVME_FEAT_PLM_CONFIG:      return "Predicatable Latency Mode Config";
        case NVME_FEAT_PLM_WINDOW:      return "Predicatable Latency Mode Window";
@@ -1830,6 +1831,9 @@ void nvme_feature_show_fields(__u32 fid, unsigned int result, unsigned char *buf
        case NVME_FEAT_KATO:
                printf("\tKeep Alive Timeout (KATO) in milliseconds: %u\n", result);
                break;
+       case NVME_FEAT_NOPSC:
+               printf("\tNon-Operational Power State Permissive Mode Enable (NOPPME): %s\n", (result & 1) ? "True" : "False");
+               break;
        }
 }