]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
nvme-cli: Update Controller Capabilities Register
authorRevanth Rajashekar <revanth.rajashekar@intel.com>
Mon, 28 Oct 2019 23:43:38 +0000 (17:43 -0600)
committerKeith Busch <kbusch@kernel.org>
Tue, 29 Oct 2019 00:08:30 +0000 (09:08 +0900)
1. Add Controller Memory Buffer Supported (CMBS)

Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
nvme-print.c
nvme.h

index e43c014128418eba3392464f0fc2ab9fc0c62e60..9d7fc79488eb2c4b42c34b5655b5b5e7dd48e522 100644 (file)
@@ -3531,8 +3531,10 @@ void json_print_nvme_subsystem_list(struct subsys_list_item *slist, int n)
 
 static void show_registers_cap(struct nvme_bar_cap *cap)
 {
+       printf("\tController Memory Buffer Supported (CMBS): The Controller Memory Buffer is %s\n",
+                       ((cap->rsvd_cmbs_pmrs & 0x02) >> 1) ? "Supported" : "Not Supported");
        printf("\tPersistent Memory Region Supported (PMRS): The Persistent Memory Region is %s\n",
-                       (cap->rsvd_pmrs & 0x01) ? "supported":"not supported");
+                       (cap->rsvd_cmbs_pmrs & 0x01) ? "supported":"not supported");
        printf("\tMemory Page Size Maximum         (MPSMAX): %u bytes\n", 1 <<  (12 + ((cap->mpsmax_mpsmin & 0xf0) >> 4)));
        printf("\tMemory Page Size Minimum         (MPSMIN): %u bytes\n", 1 <<  (12 + (cap->mpsmax_mpsmin & 0x0f)));
        printf("\tBoot Partition Support              (BPS): %s\n", (cap->bps_css_nssrs_dstrd & 0x2000) ? "Yes":"No");
diff --git a/nvme.h b/nvme.h
index 0d29c1187317790c53018db569a61b10376ba1d2..84a9987e3c841f922bb7e31580b934e8a7deff52 100644 (file)
--- a/nvme.h
+++ b/nvme.h
@@ -105,7 +105,7 @@ struct nvme_bar_cap {
        __u8    to;
        __u16   bps_css_nssrs_dstrd;
        __u8    mpsmax_mpsmin;
-       __u8    rsvd_pmrs;
+       __u8    rsvd_cmbs_pmrs;
 };
 
 #ifdef __CHECKER__