Skip to content

Commit

Permalink
nvme-print: print NSSES field of CAP register
Browse files Browse the repository at this point in the history
Print the newly added NSSES field of CAP register.

Signed-off-by: Francis Pravin <[email protected]>
  • Loading branch information
francispravin5 authored and igaw committed Sep 30, 2024
1 parent 657f100 commit fb752ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nvme-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,8 @@ static void json_registers_cap(struct nvme_bar_cap *cap, struct json_object *r)
sprintf(json_str, "%"PRIx64"", *(uint64_t *)cap);
obj_add_str(r, "cap", json_str);

obj_add_str(r, "NVM Subsystem Shutdown Enhancements Supported (NSSES)",
cap->nsses ? "Supported" : "Not supported");
obj_add_str(r, "Controller Ready With Media Support (CRWMS)",
cap->crwms ? "Supported" : "Not supported");
obj_add_str(r, "Controller Ready Independent of Media Support (CRIMS)",
Expand Down
2 changes: 2 additions & 0 deletions nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,8 @@ static void stdout_subsystem_list(nvme_root_t r, bool show_ana)

static void stdout_registers_cap(struct nvme_bar_cap *cap)
{
printf("\tNVM Subsystem Shutdown Enhancements Supported (NSSES): %s\n",
cap->nsses ? "Supported" : "Not Supported");
printf("\tController Ready With Media Support (CRWMS): %s\n",
cap->crwms ? "Supported" : "Not Supported");
printf("\tController Ready Independent of Media Support (CRIMS): %s\n",
Expand Down
3 changes: 2 additions & 1 deletion nvme-print.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ struct nvme_bar_cap {
__u8 nsss:1;
__u8 crwms:1;
__u8 crims:1;
__u8 rsvd61:3;
__u8 nsses:1;
__u8 rsvd62:2;
};

#ifdef CONFIG_JSONC
Expand Down

0 comments on commit fb752ba

Please sign in to comment.