ocssd: print ocssd features in identify app
Change-Id: Id79793e375e0f1dc2690869c4c38f59209cf806b Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.gerrithub.io/411592 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
98db8f083d
commit
ade59b217b
@ -191,11 +191,16 @@ get_features(struct spdk_nvme_ctrlr *ctrlr)
|
|||||||
SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD,
|
SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD,
|
||||||
SPDK_NVME_FEAT_ERROR_RECOVERY,
|
SPDK_NVME_FEAT_ERROR_RECOVERY,
|
||||||
SPDK_NVME_FEAT_NUMBER_OF_QUEUES,
|
SPDK_NVME_FEAT_NUMBER_OF_QUEUES,
|
||||||
|
SPDK_OCSSD_FEAT_MEDIA_FEEDBACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Submit several GET FEATURES commands and wait for them to complete */
|
/* Submit several GET FEATURES commands and wait for them to complete */
|
||||||
outstanding_commands = 0;
|
outstanding_commands = 0;
|
||||||
for (i = 0; i < SPDK_COUNTOF(features_to_get); i++) {
|
for (i = 0; i < SPDK_COUNTOF(features_to_get); i++) {
|
||||||
|
if (!spdk_nvme_ctrlr_is_ocssd_supported(ctrlr) &&
|
||||||
|
features_to_get[i] == SPDK_OCSSD_FEAT_MEDIA_FEEDBACK) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (get_feature(ctrlr, features_to_get[i]) == 0) {
|
if (get_feature(ctrlr, features_to_get[i]) == 0) {
|
||||||
outstanding_commands++;
|
outstanding_commands++;
|
||||||
} else {
|
} else {
|
||||||
@ -1243,6 +1248,16 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (features[SPDK_OCSSD_FEAT_MEDIA_FEEDBACK].valid) {
|
||||||
|
uint32_t result = features[SPDK_OCSSD_FEAT_MEDIA_FEEDBACK].result;
|
||||||
|
|
||||||
|
printf("OCSSD Media Feedback\n");
|
||||||
|
printf("=======================\n");
|
||||||
|
printf("High ECC status: %u\n", (result & 0x1));
|
||||||
|
printf("Vector High ECC status: %u\n", (result & 0x2 >> 1));
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (cdata->hctma.bits.supported) {
|
if (cdata->hctma.bits.supported) {
|
||||||
printf("Host Controlled Thermal Management\n");
|
printf("Host Controlled Thermal Management\n");
|
||||||
printf("==================================\n");
|
printf("==================================\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user