@@ -2547,15 +2547,18 @@ static void stdout_id_ctrl_ofcs(__le16 ofcs)
25472547
25482548static void stdout_id_ns_nsfeat (__u8 nsfeat )
25492549{
2550- __u8 rsvd = (nsfeat & 0xC0 ) >> 6 ;
2550+ __u8 optrperf = (nsfeat & 0x80 ) >> 7 ;
2551+ __u8 mam = (nsfeat & 0x40 ) >> 6 ;
25512552 __u8 optperf = (nsfeat & 0x30 ) >> 4 ;
25522553 __u8 uidreuse = (nsfeat & 0x8 ) >> 3 ;
25532554 __u8 dulbe = (nsfeat & 0x4 ) >> 2 ;
25542555 __u8 na = (nsfeat & 0x2 ) >> 1 ;
25552556 __u8 thin = nsfeat & 0x1 ;
25562557
2557- if (rsvd )
2558- printf (" [7:6] : %#x\tReserved\n" , rsvd );
2558+ printf (" [7:7] : %#x\tNPRG, NPRA and NORS are %sSupported\n" ,
2559+ optrperf , optrperf ? "" : "Not " );
2560+ printf (" [6:6] : %#x\t%s Atomicity Mode applies to write operations\n" ,
2561+ mam , mam ? "Multiple" : "Single" );
25592562 printf (" [5:4] : %#x\tNPWG, NPWA, %s%sNPDA, and NOWS are %sSupported\n" ,
25602563 optperf , ((optperf & 0x1 ) || (!optperf )) ? "NPDG, " : "" ,
25612564 ((optperf & 0x2 ) || (!optperf )) ? "NPDGL, " : "" , optperf ? "" : "Not " );
@@ -2647,13 +2650,16 @@ static void stdout_id_ns_dps(__u8 dps)
26472650
26482651static void stdout_id_ns_nmic (__u8 nmic )
26492652{
2650- __u8 rsvd = (nmic & 0xFE ) >> 1 ;
2651- __u8 mp = nmic & 0x1 ;
2653+ __u8 rsvd = (nmic & 0xfc ) >> 2 ;
2654+ __u8 disns = (nmic & 0x2 ) >> 1 ;
2655+ __u8 shrns = nmic & 0x1 ;
26522656
26532657 if (rsvd )
2654- printf (" [7:1] : %#x\tReserved\n" , rsvd );
2658+ printf (" [7:2] : %#x\tReserved\n" , rsvd );
2659+ printf (" [1:1] : %#x\tNamespace is %sa Dispersed Namespace\n" ,
2660+ disns , disns ? "" : "Not " );
26552661 printf (" [0:0] : %#x\tNamespace Multipath %sCapable\n" ,
2656- mp , mp ? "" : "Not " );
2662+ shrns , shrns ? "" : "Not " );
26572663 printf ("\n" );
26582664}
26592665
@@ -2732,6 +2738,21 @@ static void stdout_id_ns_dlfeat(__u8 dlfeat)
27322738 printf ("\n" );
27332739}
27342740
2741+ static void stdout_id_ns_kpios (__u8 kpios )
2742+ {
2743+ __u8 rsvd = (kpios & 0xfc ) >> 2 ;
2744+ __u8 kpiosns = (kpios & 0x2 ) >> 1 ;
2745+ __u8 kpioens = kpios & 0x1 ;
2746+
2747+ if (rsvd )
2748+ printf (" [7:2] : %#x\tReserved\n" , rsvd );
2749+ printf (" [1:1] : %#x\tKey Per I/O Capability %sSupported\n" ,
2750+ kpiosns , kpiosns ? "" : "Not " );
2751+ printf (" [0:0] : %#x\tKey Per I/O Capability %s\n" , kpioens ,
2752+ kpioens ? "Enabled" : "Disabled" );
2753+ printf ("\n" );
2754+ }
2755+
27352756static void stdout_id_ns (struct nvme_id_ns * ns , unsigned int nsid ,
27362757 unsigned int lba_index , bool cap_only )
27372758{
@@ -2802,11 +2823,17 @@ static void stdout_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
28022823 printf ("mssrl : %u\n" , le16_to_cpu (ns -> mssrl ));
28032824 printf ("mcl : %u\n" , le32_to_cpu (ns -> mcl ));
28042825 printf ("msrc : %u\n" , ns -> msrc );
2826+ printf ("kpios : %u\n" , ns -> kpios );
2827+ if (human )
2828+ stdout_id_ns_kpios (ns -> kpios );
28052829 }
28062830 printf ("nulbaf : %u\n" , ns -> nulbaf );
28072831 if (!cap_only ) {
2832+ printf ("kpiodaag: %u\n" , le32_to_cpu (ns -> kpiodaag ));
28082833 printf ("anagrpid: %u\n" , le32_to_cpu (ns -> anagrpid ));
28092834 printf ("nsattr : %u\n" , ns -> nsattr );
2835+ if (human )
2836+ stdout_id_ns_nsattr (ns -> nsattr );
28102837 printf ("nvmsetid: %d\n" , le16_to_cpu (ns -> nvmsetid ));
28112838 printf ("endgid : %d\n" , le16_to_cpu (ns -> endgid ));
28122839
0 commit comments