Skip to content

Commit

Permalink
nvme-print: fix the result of I/O Command Set Profile feature
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
francispravin5 committed Feb 17, 2025
1 parent 1a3de10 commit 6a5b981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nvme-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -3518,7 +3518,7 @@ static void json_feature_show_fields_endurance_evt_cfg(struct json_object *r, un

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

static void json_feature_show_fields_spinup_control(struct json_object *r, unsigned int result)
Expand Down
2 changes: 1 addition & 1 deletion nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -5033,7 +5033,7 @@ static void stdout_feature_show_fields(enum nvme_features_id fid,
printf("\tEndurance Group Critical Warnings : %u\n", NVME_FEAT_EG_EGCW(result));
break;
case NVME_FEAT_FID_IOCS_PROFILE:
printf("\tI/O Command Set Profile: %s\n", result & 0x1 ? "True" : "False");
printf("\tI/O Command Set Profile: %u\n", NVME_GET(result, FEAT_IOCSP_IOCSCI));
break;
case NVME_FEAT_FID_SPINUP_CONTROL:
printf("\tSpinup control feature Enabled: %s\n", (result & 1) ? "True" : "False");
Expand Down

0 comments on commit 6a5b981

Please sign in to comment.