[PATCH] nvme-cli: fix wrong bitmask in number of rpmb units.
Minwoo Im
minwoo.im.dev at gmail.com
Sat Oct 28 11:01:52 PDT 2017
Number of RPMB Units is a 3-bit field[02:00].
Bitmask should be 0111b(7h) to get this field.
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
nvme-print.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvme-print.c b/nvme-print.c
index 9f524cd..e79b3f4 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -218,7 +218,7 @@ static void show_nvme_id_ctrl_rpmbs(__le32 ctrl_rpmbs)
__u32 tsz = (rpmbs & 0xFF0000) >> 16;
__u32 rsvd = (rpmbs & 0xFFC0) >> 6;
__u32 auth = (rpmbs & 0x38) >> 3;
- __u32 rpmb = rpmbs & 0x3;
+ __u32 rpmb = rpmbs & 0x7;
printf(" [31:24]: %#x\tAccess Size\n", asz);
printf(" [23:16]: %#x\tTotal Size\n", tsz);
--
2.7.4
More information about the Linux-nvme
mailing list