From: Revanth Rajashekar Date: Wed, 13 Jun 2018 21:21:43 +0000 (-0600) Subject: nvme-cli: Implement printing get NOPSC feature X-Git-Tag: v1.6~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=199194e0ada08d5e19bf538922d666d8d574bb7e;p=users%2Fsagi%2Fnvme-cli.git nvme-cli: Implement printing get NOPSC feature Signed-off-by: Revanth Rajashekar Signed-off-by: Keith Busch --- diff --git a/linux/nvme.h b/linux/nvme.h index 62e18fc7..8df72554 100644 --- a/linux/nvme.h +++ b/linux/nvme.h @@ -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, diff --git a/nvme-print.c b/nvme-print.c index 37144ffb..8699d6cc 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -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; } }