@@ -122,13 +122,27 @@ static void show_nvme_id_ctrl_cmic(__u8 cmic)
122122static void show_nvme_id_ctrl_oaes (__le32 ctrl_oaes )
123123{
124124 __u32 oaes = le32_to_cpu (ctrl_oaes );
125- __u32 rsvd0 = (oaes & 0xFFFFFC00 ) >> 10 ;
125+ __u32 rsvd0 = (oaes & 0xFFFF8000 ) >> 15 ;
126126 __u32 nace = (oaes & 0x100 ) >> 8 ;
127127 __u32 fan = (oaes & 0x200 ) >> 9 ;
128+ __u32 anacn = (oaes & 800 ) >> 11 ;
129+ __u32 plealcn = (oaes & 0x1000 ) >> 12 ;
130+ __u32 lbasin = (oaes & 0x2000 ) >> 13 ;
131+ __u32 egealpcn = (oaes & 0x4000 ) >> 14 ;
128132 __u32 rsvd1 = oaes & 0xFF ;
129133
130134 if (rsvd0 )
131135 printf (" [31:10] : %#x\tReserved\n" , rsvd0 );
136+ printf ("[14:14] : %#x\tEndurance Group Event Aggregate Log Page" \
137+ " Change Notice %sSupported\n" ,
138+ egealpcn , egealpcn ? "" : "Not " );
139+ printf ("[13:13] : %#x\tLBA Status Information Notices %sSupported\n" ,
140+ lbasin , lbasin ? "" : "Not " );
141+ printf ("[12:12] : %#x\tPredictable Latency Event Aggregate Log Change" \
142+ " Notices %sSupported\n" ,
143+ plealcn , plealcn ? "" : "Not " );
144+ printf ("[11:11] : %#x\tAsymmetric Namespace Access Change Notices" \
145+ " %sSupported\n" , anacn , anacn ? "" : "Not " );
132146 printf (" [9:9] : %#x\tFirmware Activation Notices %sSupported\n" ,
133147 fan , fan ? "" : "Not " );
134148 printf (" [8:8] : %#x\tNamespace Attribute Changed Event %sSupported\n" ,
@@ -172,7 +186,8 @@ static void show_nvme_id_ctrl_ctratt(__le32 ctrl_ctratt)
172186static void show_nvme_id_ctrl_oacs (__le16 ctrl_oacs )
173187{
174188 __u16 oacs = le16_to_cpu (ctrl_oacs );
175- __u16 rsvd = (oacs & 0xFE00 ) >> 9 ;
189+ __u16 rsvd = (oacs & 0xFC00 ) >> 10 ;
190+ __u16 glbas = (oacs & 0x200 ) >> 9 ;
176191 __u16 dbc = (oacs & 0x100 ) >> 8 ;
177192 __u16 vir = (oacs & 0x80 ) >> 7 ;
178193 __u16 nmi = (oacs & 0x40 ) >> 6 ;
@@ -185,6 +200,8 @@ static void show_nvme_id_ctrl_oacs(__le16 ctrl_oacs)
185200
186201 if (rsvd )
187202 printf (" [15:9] : %#x\tReserved\n" , rsvd );
203+ printf (" [9:9] : %#x\tGet LBA Status Capability %sSupported\n" ,
204+ glbas , glbas ? "" : "Not " );
188205 printf (" [8:8] : %#x\tDoorbell Buffer Config %sSupported\n" ,
189206 dbc , dbc ? "" : "Not " );
190207 printf (" [7:7] : %#x\tVirtualization Management %sSupported\n" ,
@@ -2232,6 +2249,34 @@ void nvme_feature_show_fields(__u32 fid, unsigned int result, unsigned char *buf
22322249 }
22332250}
22342251
2252+ void show_lba_status (struct nvme_lba_status * list )
2253+ {
2254+ int idx ;
2255+
2256+ printf ("Number of LBA Status Descriptors(NLSD): %lu\n" ,
2257+ le64_to_cpu (list -> nlsd ));
2258+ printf ("Completion Condition(CMPC): %u\n" , list -> cmpc );
2259+ switch (list -> cmpc ) {
2260+ case 1 :
2261+ printf ("\tCompleted due to transferring the amount of data" \
2262+ " specified in the MNDW field\n" );
2263+ break ;
2264+ case 2 :
2265+ printf ("\tCompleted due to having performed the action\n" \
2266+ "\tspecified in the Action Type field over the\n" \
2267+ "\tnumber of logical blocks specified in the\n" \
2268+ "\tRange Length field\n" );
2269+ break ;
2270+ }
2271+
2272+ for (idx = 0 ; idx < list -> nlsd ; idx ++ ) {
2273+ struct nvme_lba_status_desc * e = & list -> descs [idx ];
2274+ printf ("{ DSLBA: 0x%016" PRIu64 ", NLB: 0x%08x, Status: 0x%02x }\n" ,
2275+ le64_to_cpu (e -> dslba ), le32_to_cpu (e -> nlb ),
2276+ e -> status );
2277+ }
2278+ }
2279+
22352280static void show_list_item (struct list_item list_item )
22362281{
22372282 long long int lba = 1 << list_item .ns .lbaf [(list_item .ns .flbas & 0x0f )].ds ;
0 commit comments