Skip to contentSkip to conversation

nvme-cli: fix wrong bitmask in number of rpmb units.

PATCH New Minwoo Im 2 participants 2 messages Oct 28, 2017 – Oct 30, 2017 NVMe

lore
Share & tools
lore

Minwoo Im

author
#0 lore raw

PATCH 1/1 nvme-cli: fix wrong bitmask in number of rpmb units.

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(-)
nvme-print.c +1 -1
index 9f524cd..e79b3f4 100644
@@ -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);
Signature · 1 line
2.7.4
Applied
#1 lore raw

PATCH 1/1 nvme-cli: fix wrong bitmask in number of rpmb units.

Quoted 4 lines · Minwoo Im

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>

Applied, thanks.