#define CREATE_CMD
#include "intel-nvme.h"
+#pragma pack(push,1)
+struct nvme_additional_smart_log_item {
+ __u8 key;
+ __u8 _kp[2];
+ __u8 norm;
+ __u8 _np;
+ union {
+ __u8 raw[6];
+ struct wear_level {
+ __le16 min;
+ __le16 max;
+ __le16 avg;
+ } wear_level ;
+ struct thermal_throttle {
+ __u8 pct;
+ __u32 count;
+ } thermal_throttle;
+ };
+ __u8 _rp;
+};
+#pragma pack(pop)
+
+struct nvme_additional_smart_log {
+ struct nvme_additional_smart_log_item program_fail_cnt;
+ struct nvme_additional_smart_log_item erase_fail_cnt;
+ struct nvme_additional_smart_log_item wear_leveling_cnt;
+ struct nvme_additional_smart_log_item e2e_err_cnt;
+ struct nvme_additional_smart_log_item crc_err_cnt;
+ struct nvme_additional_smart_log_item timed_workload_media_wear;
+ struct nvme_additional_smart_log_item timed_workload_host_reads;
+ struct nvme_additional_smart_log_item timed_workload_timer;
+ struct nvme_additional_smart_log_item thermal_throttle_status;
+ struct nvme_additional_smart_log_item retry_buffer_overflow_cnt;
+ struct nvme_additional_smart_log_item pll_lock_loss_cnt;
+ struct nvme_additional_smart_log_item nand_bytes_written;
+ struct nvme_additional_smart_log_item host_bytes_written;
+};
+
static void intel_id_ctrl(__u8 *vs, struct json_object *root)
{
char bl[9];
NVME_ID_CNS_CTRL_LIST = 0x13,
};
-#pragma pack(push,1)
-struct nvme_additional_smart_log_item {
- __u8 key;
- __u8 _kp[2];
- __u8 norm;
- __u8 _np;
- union {
- __u8 raw[6];
- struct wear_level {
- __le16 min;
- __le16 max;
- __le16 avg;
- } wear_level ;
- struct thermal_throttle {
- __u8 pct;
- __u32 count;
- } thermal_throttle;
- };
- __u8 _rp;
-};
-#pragma pack(pop)
-
-struct nvme_additional_smart_log {
- struct nvme_additional_smart_log_item program_fail_cnt;
- struct nvme_additional_smart_log_item erase_fail_cnt;
- struct nvme_additional_smart_log_item wear_leveling_cnt;
- struct nvme_additional_smart_log_item e2e_err_cnt;
- struct nvme_additional_smart_log_item crc_err_cnt;
- struct nvme_additional_smart_log_item timed_workload_media_wear;
- struct nvme_additional_smart_log_item timed_workload_host_reads;
- struct nvme_additional_smart_log_item timed_workload_timer;
- struct nvme_additional_smart_log_item thermal_throttle_status;
- struct nvme_additional_smart_log_item retry_buffer_overflow_cnt;
- struct nvme_additional_smart_log_item pll_lock_loss_cnt;
- struct nvme_additional_smart_log_item nand_bytes_written;
- struct nvme_additional_smart_log_item host_bytes_written;
-};
-
struct nvme_host_mem_buffer {
__u32 hsize;
__u32 hmdlal;