]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-cli: print firmware activation notices support bit to id_ctrl
authorMinwoo Im <minwoo.im.dev@gmail.com>
Sun, 1 Jul 2018 13:58:05 +0000 (22:58 +0900)
committerKeith Busch <keith.busch@intel.com>
Mon, 2 Jul 2018 16:40:54 +0000 (10:40 -0600)
It's now currently printing the OAES(Optional Asynchronous Events Supported)
field in identify controller data structure without [9] firmware activation
notices field in case of human-readable format.
Print it out by updating the reserved bit field.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
nvme-print.c

index 20c245873e4ff3d20eba365614114a2f0d38deaa..daf2929577c82d1d22668148f223866a09b3d0d5 100644 (file)
@@ -94,12 +94,15 @@ static void show_nvme_id_ctrl_cmic(__u8 cmic)
 static void show_nvme_id_ctrl_oaes(__le32 ctrl_oaes)
 {
        __u32 oaes = le32_to_cpu(ctrl_oaes);
-       __u32 rsvd0 = (oaes & 0xFFFFFE00) >> 9;
+       __u32 rsvd0 = (oaes & 0xFFFFFC00) >> 10;
        __u32 nace = (oaes & 0x100) >> 8;
+       __u32 fan = (oaes & 0x200) >> 9;
        __u32 rsvd1 = oaes & 0xFF;
 
        if (rsvd0)
-               printf(" [31:9] : %#x\tReserved\n", rsvd0);
+               printf(" [31:10] : %#x\tReserved\n", rsvd0);
+       printf("  [9:9] : %#x\tFirmware Activation Notices %sSupported\n",
+               fan, fan ? "" : "Not ");
        printf("  [8:8] : %#x\tNamespace Attribute Changed Event %sSupported\n",
                nace, nace ? "" : "Not ");
        if (rsvd1)