From 97028262fe3b356fab0f161f22b9667a58648d65 Mon Sep 17 00:00:00 2001 From: Steven Seungcheol Lee Date: Wed, 8 Feb 2023 15:05:27 +0900 Subject: [PATCH] nvme-print: Add VWCNP on NSFEAT of id-ns MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Identify – I/O Command Set Independent Identify Namespace Data Structure From TP4146 Flexible Data Placement 2022.11.30 Ratified Signed-off-by: Steven Seungcheol Lee --- nvme-print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nvme-print.c b/nvme-print.c index 11746993..805c8c59 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -2753,12 +2753,15 @@ void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid, static void nvme_show_cmd_set_independent_id_ns_nsfeat(__u8 nsfeat) { - __u8 rsvd5 = (nsfeat & 0xE0) >> 5; + __u8 rsvd6 = (nsfeat & 0xE0) >> 6; + __u8 vwcnp = (nsfeat & 0x20) >> 5; __u8 rmedia = (nsfeat & 0x10) >> 4; __u8 uidreuse = (nsfeat & 0x8) >> 3; __u8 rsvd0 = (nsfeat & 0x7); - if (rsvd5) - printf(" [7:5] : %#x\tReserved\n", rsvd5); + if (rsvd6) + printf(" [7:6] : %#x\tReserved\n", rsvd6); + printf(" [5:5] : %#x\tVolatile Write Cache is %sPresent\n", + vwcnp, vwcnp ? "" : "Not "); printf(" [4:4] : %#x\tNamespace %sstore data on rotational media\n", rmedia, rmedia ? "" : "does not "); printf(" [3:3] : %#x\tNGUID and EUI64 fields if non-zero, %sReused\n", -- 2.50.1