Skip to content

Commit bc7cca2

Browse files
RevanthRajashekarkeithbusch
authored andcommitted
nvme-cli: Update Controller Capabilities Register
1. Add Controller Memory Buffer Supported (CMBS) Signed-off-by: Revanth Rajashekar <[email protected]>
1 parent b6b6081 commit bc7cca2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

nvme-print.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3531,8 +3531,10 @@ void json_print_nvme_subsystem_list(struct subsys_list_item *slist, int n)
35313531

35323532
static void show_registers_cap(struct nvme_bar_cap *cap)
35333533
{
3534+
printf("\tController Memory Buffer Supported (CMBS): The Controller Memory Buffer is %s\n",
3535+
((cap->rsvd_cmbs_pmrs & 0x02) >> 1) ? "Supported" : "Not Supported");
35343536
printf("\tPersistent Memory Region Supported (PMRS): The Persistent Memory Region is %s\n",
3535-
(cap->rsvd_pmrs & 0x01) ? "supported":"not supported");
3537+
(cap->rsvd_cmbs_pmrs & 0x01) ? "supported":"not supported");
35363538
printf("\tMemory Page Size Maximum (MPSMAX): %u bytes\n", 1 << (12 + ((cap->mpsmax_mpsmin & 0xf0) >> 4)));
35373539
printf("\tMemory Page Size Minimum (MPSMIN): %u bytes\n", 1 << (12 + (cap->mpsmax_mpsmin & 0x0f)));
35383540
printf("\tBoot Partition Support (BPS): %s\n", (cap->bps_css_nssrs_dstrd & 0x2000) ? "Yes":"No");

nvme.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct nvme_bar_cap {
105105
__u8 to;
106106
__u16 bps_css_nssrs_dstrd;
107107
__u8 mpsmax_mpsmin;
108-
__u8 rsvd_pmrs;
108+
__u8 rsvd_cmbs_pmrs;
109109
};
110110

111111
#ifdef __CHECKER__

0 commit comments

Comments
 (0)