9
9
#include "common.h"
10
10
#include "solidigm-id-ctrl.h"
11
11
12
- struct __packed nvme_vu_id_ctrl_field { /* CDR MR5 */
12
+ struct __packed nvme_vu_id_ctrl_field { // CPC
13
13
__u8 rsvd1 [3 ];
14
14
__u8 ss ;
15
15
char health [20 ];
@@ -22,6 +22,26 @@ struct __packed nvme_vu_id_ctrl_field { /* CDR MR5 */
22
22
__le64 ww ;
23
23
char mic_bl [4 ];
24
24
char mic_fw [4 ];
25
+ __u8 rsvd3 [678 ];
26
+ __u32 signature ;
27
+ __u8 version ;
28
+ __u8 product_type ;
29
+ __u8 nand_type ;
30
+ __u8 form_factor ;
31
+ __u32 fw_status ;
32
+ __u32 p4_revision ; // git hash first 8 characters
33
+ __u32 customer_id ;
34
+ __u32 usage_model ;
35
+ struct {
36
+ __u32 zns_nvme : 1 ; // bit 0
37
+ __u32 mfnd_nvme : 1 ; // bit 1
38
+ __u32 cdw1413 : 1 ; // bit 2: CDW14 remapping into CDW13
39
+ __u32 vpd_avail : 1 ; // bit 3: VPD EEPROM is available
40
+ //at moment of id-ctrl response
41
+ __u32 rsvd : 28 ; // bit 4..31 are unused
42
+ }
43
+ command_set ;
44
+
25
45
};
26
46
27
47
void sldgm_id_ctrl (uint8_t * vs , struct json_object * root )
@@ -37,6 +57,19 @@ void sldgm_id_ctrl(uint8_t *vs, struct json_object *root)
37
57
const char * str_ww = "wwid" ;
38
58
const char * str_mic_bl = "bwLimGran" ;
39
59
const char * str_mic_fw = "ioLimGran" ;
60
+ const char * str_signature = "signature" ;
61
+ const char * str_version = "version" ;
62
+ const char * str_product_type = "prodType" ;
63
+ const char * str_nand_type = "nandType" ;
64
+ const char * str_form_factor = "formFactor" ;
65
+ const char * str_fw_status = "fwStatus" ;
66
+ const char * str_p4_revision = "P4Revision" ;
67
+ const char * str_customer_id = "customerID" ;
68
+ const char * str_usage_model = "usageModel" ;
69
+ const char * str_zns_nvme = "znsNVMe" ;
70
+ const char * str_mfnd_nvme = "mfndNVMe" ;
71
+ const char * str_cdw14_cdw13 = "cdw14map13" ;
72
+ const char * str_vpd_avail = "vpdAvail" ;
40
73
41
74
struct nvme_vu_id_ctrl_field * id = (struct nvme_vu_id_ctrl_field * )vs ;
42
75
@@ -54,20 +87,46 @@ void sldgm_id_ctrl(uint8_t *vs, struct json_object *root)
54
87
printf ("%-10s: 0x%016" PRIx64 "\n" , str_ww , le64_to_cpu (id -> ww ));
55
88
printf ("%-10s: %.*s\n" , str_mic_bl , (int )sizeof (id -> mic_bl ), id -> mic_bl );
56
89
printf ("%-10s: %.*s\n" , str_mic_fw , (int )sizeof (id -> mic_fw ), id -> mic_fw );
90
+ printf ("%-10s: 0x%08X\n" , str_signature , id -> signature );
91
+ printf ("%-10s: 0x%02X\n" , str_version , id -> version );
92
+ printf ("%-10s: %u\n" , str_product_type , id -> product_type );
93
+ printf ("%-10s: %u\n" , str_nand_type , id -> nand_type );
94
+ printf ("%-10s: %u\n" , str_form_factor , id -> form_factor );
95
+ printf ("%-10s: %u\n" , str_fw_status , id -> fw_status );
96
+ printf ("%-10s: 0x%08X\n" , str_p4_revision , id -> p4_revision );
97
+ printf ("%-10s: 0x%08X\n" , str_customer_id , id -> customer_id );
98
+ printf ("%-10s: %u\n" , str_usage_model , id -> usage_model );
99
+ printf ("%-10s: %u\n" , str_zns_nvme , id -> command_set .zns_nvme );
100
+ printf ("%-10s: %u\n" , str_mfnd_nvme , id -> command_set .mfnd_nvme );
101
+ printf ("%-10s: %u\n" , str_cdw14_cdw13 , id -> command_set .cdw1413 );
102
+ printf ("%-10s: %u\n" , str_vpd_avail , id -> command_set .vpd_avail );
57
103
return ;
58
104
}
59
105
60
106
json_object_add_value_uint (root , str_ss , id -> ss );
61
107
json_object_object_add (root , str_health ,
62
- json_object_new_string_len (health , sizeof (id -> health )));
108
+ json_object_new_string_len (health , sizeof (id -> health )));
63
109
json_object_add_value_uint (root , str_cls , id -> cls );
64
110
json_object_add_value_uint (root , str_nlw , id -> nlw );
65
111
json_object_add_value_uint (root , str_scap , id -> scap );
66
112
json_object_add_value_uint (root , str_sstat , id -> sstat );
67
113
json_object_object_add (root , str_bl , json_object_new_string_len (id -> bl , sizeof (id -> bl )));
68
114
json_object_add_value_uint64 (root , str_ww , le64_to_cpu (id -> ww ));
69
115
json_object_object_add (root , str_mic_bl ,
70
- json_object_new_string_len (id -> mic_bl , sizeof (id -> mic_bl )));
116
+ json_object_new_string_len (id -> mic_bl , sizeof (id -> mic_bl )));
71
117
json_object_object_add (root , str_mic_fw ,
72
- json_object_new_string_len (id -> mic_fw , sizeof (id -> mic_fw )));
118
+ json_object_new_string_len (id -> mic_fw , sizeof (id -> mic_fw )));
119
+ json_object_add_value_uint (root , str_signature , id -> signature );
120
+ json_object_add_value_uint (root , str_version , id -> version );
121
+ json_object_add_value_uint (root , str_product_type , id -> product_type );
122
+ json_object_add_value_uint (root , str_nand_type , id -> nand_type );
123
+ json_object_add_value_uint (root , str_form_factor , id -> form_factor );
124
+ json_object_add_value_uint (root , str_fw_status , id -> fw_status );
125
+ json_object_add_value_uint (root , str_p4_revision , id -> p4_revision );
126
+ json_object_add_value_uint (root , str_customer_id , id -> customer_id );
127
+ json_object_add_value_uint (root , str_usage_model , id -> usage_model );
128
+ json_object_add_value_uint (root , str_zns_nvme , id -> command_set .zns_nvme );
129
+ json_object_add_value_uint (root , str_mfnd_nvme , id -> command_set .mfnd_nvme );
130
+ json_object_add_value_uint (root , str_cdw14_cdw13 , id -> command_set .cdw1413 );
131
+ json_object_add_value_uint (root , str_vpd_avail , id -> command_set .vpd_avail );
73
132
}
0 commit comments