Skip to content

Commit e8a42ca

Browse files
francispravin5igaw
authored andcommitted
nvme-print: fix the result of I/O Command Set Profile feature
The Get Features command submitted for I/O Command Set Profile feature will return the I/O Command Set Combination Index [08:00] in Dword0 of completion queue entry. So, fixed the mask of the result. Signed-off-by: Francis Pravin <francis.p@samsung.com>
1 parent 359a3d1 commit e8a42ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nvme-print-json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3518,7 +3518,7 @@ static void json_feature_show_fields_endurance_evt_cfg(struct json_object *r, un
35183518

35193519
static void json_feature_show_fields_iocs_profile(struct json_object *r, unsigned int result)
35203520
{
3521-
obj_add_str(r, "I/O Command Set Profile", result & 0x1 ? "True" : "False");
3521+
obj_add_uint(r, "I/O Command Set Profile", NVME_GET(result, FEAT_IOCSP_IOCSCI));
35223522
}
35233523

35243524
static void json_feature_show_fields_spinup_control(struct json_object *r, unsigned int result)

nvme-print-stdout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5033,7 +5033,7 @@ static void stdout_feature_show_fields(enum nvme_features_id fid,
50335033
printf("\tEndurance Group Critical Warnings : %u\n", NVME_FEAT_EG_EGCW(result));
50345034
break;
50355035
case NVME_FEAT_FID_IOCS_PROFILE:
5036-
printf("\tI/O Command Set Profile: %s\n", result & 0x1 ? "True" : "False");
5036+
printf("\tI/O Command Set Profile: %u\n", NVME_GET(result, FEAT_IOCSP_IOCSCI));
50375037
break;
50385038
case NVME_FEAT_FID_SPINUP_CONTROL:
50395039
printf("\tSpinup control feature Enabled: %s\n", (result & 1) ? "True" : "False");

0 commit comments

Comments
 (0)