]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
id-ctrl: add an indicator for get lba status capability
authorMinwoo Im <minwoo.im.dev@gmail.com>
Wed, 31 Jul 2019 09:25:48 +0000 (18:25 +0900)
committerMinwoo Im <minwoo.im.dev@gmail.com>
Wed, 31 Jul 2019 09:25:48 +0000 (18:25 +0900)
NVMe 1.4 supports for the Get LBA Status Capability which can be
referred to 8.22.  The Identify Controller is now able to indicate
whether or not the Get LBA Status Capability is supported.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
nvme-print.c

index 2b6bc389015bc1eec35d0043314d25373bd0b6b7..b6e18d488a8ea970bae5d90318c27f98270cc0fa 100644 (file)
@@ -169,7 +169,8 @@ static void show_nvme_id_ctrl_ctratt(__le32 ctrl_ctratt)
 static void show_nvme_id_ctrl_oacs(__le16 ctrl_oacs)
 {
        __u16 oacs = le16_to_cpu(ctrl_oacs);
-       __u16 rsvd = (oacs & 0xFE00) >> 9;
+       __u16 rsvd = (oacs & 0xFC00) >> 10;
+       __u16 glbas = (oacs & 0x200) >> 9;
        __u16 dbc = (oacs & 0x100) >> 8;
        __u16 vir = (oacs & 0x80) >> 7;
        __u16 nmi = (oacs & 0x40) >> 6;
@@ -182,6 +183,8 @@ static void show_nvme_id_ctrl_oacs(__le16 ctrl_oacs)
 
        if (rsvd)
                printf(" [15:9] : %#x\tReserved\n", rsvd);
+       printf("  [9:9] : %#x\tGet LBA Status Capability %sSupported\n",
+               glbas, glbas ? "" : "Not ");
        printf("  [8:8] : %#x\tDoorbell Buffer Config %sSupported\n",
                dbc, dbc ? "" : "Not ");
        printf("  [7:7] : %#x\tVirtualization Management %sSupported\n",