]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print: print NSSES field of CAP register
authorFrancis Pravin <francis.p@samsung.com>
Mon, 30 Sep 2024 12:52:31 +0000 (18:22 +0530)
committerDaniel Wagner <wagi@monom.org>
Mon, 30 Sep 2024 16:29:16 +0000 (18:29 +0200)
Print the newly added NSSES field of CAP register.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
nvme-print-json.c
nvme-print-stdout.c
nvme-print.h

index d2faa1c797285ab58e51a0538577ff21b51fb9a5..cd342470d9c12160c2d9a6bbfdec1896538e3da2 100644 (file)
@@ -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)",
index c93c2e7ebaebd5027638d00b0bad7dabb15b3aaf..a885441d3304faad38d5e797f9ba47b0c2511613 100644 (file)
@@ -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",
index 3f79fd68511ecce3ce6b0c839dde9e7d25c25bd4..7ebf64556e81f19a0e9232ca4e287c956687f1bf 100644 (file)
@@ -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