From dada91d94f0f43139b9f0d79feacdb844a4169fc Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Fri, 18 Sep 2020 15:29:38 +0000 Subject: [PATCH] nvme-print: ZNS zoc field is 16 bits According to the ZNS specification, the ZNS zoc field is 16 bits, whereof 14 are reserved bits. Signed-off-by: Niklas Cassel --- nvme-print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvme-print.c b/nvme-print.c index 5e5143a5..1a253b57 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -2957,11 +2957,11 @@ void json_nvme_zns_id_ns(struct nvme_zns_id_ns *ns, static void show_nvme_id_ns_zoned_zoc(__le16 ns_zoc) { __u16 zoc = le16_to_cpu(ns_zoc); - __u8 rsvd = (zoc & 0xfc) >> 2; + __u8 rsvd = (zoc & 0xfffc) >> 2; __u8 ze = (zoc & 0x2) >> 1; __u8 vzc = zoc & 0x1; if (rsvd) - printf(" [7:2] : %#x\tReserved\n", rsvd); + printf(" [15:2] : %#x\tReserved\n", rsvd); printf(" [1:1] : %#x\tZone Active Excursions: %s\n", ze, ze ? "Yes (Host support required)" : "No"); printf(" [0:0] : %#x\tVariable Zone Capacity: %s\n", -- 2.50.1