Skip to contentSkip to conversation

nvme-cli: Implement printing get NOPSC feature

PATCH New Revanth Rajashekar 2 participants 2 messages Jun 13, 2018 – Jun 14, 2018 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-cli: Implement printing get NOPSC feature

Signed-off-by Revanth Rajashekar <revanth.rajashekar at intel.com>
---
 linux/nvme.h | 1 +
 nvme-print.c | 4 ++++
 2 files changed, 5 insertions(+)
linux/nvme.h +1 -0
index 01b4e6d..e75a4b0 100644
@@ -857,6 +857,7 @@ enum {
 	NVME_FEAT_HOST_MEM_BUF	= 0x0d,
 	NVME_FEAT_TIMESTAMP	= 0x0e,
 	NVME_FEAT_KATO		= 0x0f,
+	NVME_FEAT_NOPSC		= 0X11,
 	NVME_FEAT_RRL		= 0x12,
 	NVME_FEAT_PLM_CONFIG	= 0x13,
 	NVME_FEAT_PLM_WINDOW	= 0x14,
nvme-print.c +4 -0
index cdaf1cb..adc7b3a 100644
@@ -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";
@@ -1807,6 +1808,9 @@ void nvme_feature_show_fields(__u32 fid, unsigned int result, unsigned char *buf
 	case NVME_FEAT_RESV_PERSIST:
 		printf("\tPersist Through Power Loss (PTPL): %s\n", (result & 0x00000001) ? "True":"False");
 		break;
+	case NVME_FEAT_NOPSC:
+		printf("\tNon-Operational Power State Permissive Mode Enable (NOPPME): %s\n", (result & 1) ? "True" : "False");
+		break;
 	}
 }
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 nvme-cli: Implement printing get NOPSC feature

I'm not sure what order you intended for me to apply these in. It looks like all 4 were developed indepenedently and they all clash with each other. It looked pretty straight forward to resolve, so I manually applied all 4 and pushed. Please have a look.