Skip to content

Commit bb2f85f

Browse files
author
Gopinath P/Gopinath P
committed
plugin/ocp: Added OCP 2.7 smart extended log changes
Updated the smart extended log page structure, json and stdout print ocp2.7 enhancement. Reviewed-by: Karthik Balan <karthik.b82@samsung.com> Reviewed-by: Arunpandian J <arun.j@samsung.com> Signed-off-by: Gopinath P <p.gopinath@samsungds.net>
1 parent 5f03495 commit bb2f85f

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

plugins/ocp/ocp-print-json.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ static void json_smart_extended_log_v1(struct ocp_smart_extended_log *log)
226226
case 0 ... 1:
227227
break;
228228
default:
229+
case 6:
230+
json_object_add_value_uint(root, "Form factor",
231+
log->form_factor);
232+
json_object_add_value_uint64(root, "Die in use bad nand block raw",
233+
int48_to_long(log->die_in_use_bad_nand_block_raw));
234+
json_object_add_value_uint(root, "Die in use bad nand block normalized",
235+
le16_to_cpu(log->die_in_use_bad_nand_block_normalized));
236+
fallthrough;
229237
case 5:
230238
json_object_add_value_uint(root, "NVMe Over Pcie Errata Version",
231239
log->nvme_over_pcie_errate_version);

plugins/ocp/ocp-print-stdout.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ static void stdout_smart_extended_log(struct ocp_smart_extended_log *log, unsign
168168
case 0 ... 1:
169169
break;
170170
default:
171+
case 6:
172+
printf(" Form factor %d\n",
173+
log->form_factor);
174+
printf(" Die in use bad nand block - Raw %"PRIu64"\n",
175+
int48_to_long(log->die_in_use_bad_nand_block_raw));
176+
printf(" Die in use bad nand block - Normalized %d\n",
177+
le16_to_cpu(log->die_in_use_bad_nand_block_normalized));
178+
fallthrough;
171179
case 5:
172180
printf(" NVMe Over Pcie Errata Version %d\n",
173181
log->nvme_over_pcie_errate_version);

plugins/ocp/ocp-smart-extended-log.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct ocp_smart_extended_log {
128128
__le16 total_die_failure_tolerance; /* [219:218] */
129129
__le16 media_dies_offline; /* [221:220] */
130130
__u8 max_temperature_recorded; /* [222] */
131-
__u8 rsvd223; /* [223] */
131+
__u8 form_factor; /* [223] */
132132
__le64 nand_avg_erase_count; /* [231:224] */
133133
__le32 command_timeouts; /* [235:232] */
134134
__le32 sys_area_program_fail_count_raw; /* [239:236] */
@@ -145,8 +145,10 @@ struct ocp_smart_extended_log {
145145
__u8 lifetime_power_consumed[6]; /* [269:264] */
146146
__u8 dssd_firmware_revision[8]; /* [277:270] */
147147
__u8 dssd_firmware_build_uuid[16]; /* [293:278] */
148-
__u8 dssd_firmware_build_label[64]; /* [375:294] */
149-
__u8 rsvd358[136]; /* [493:358] */
148+
__u8 dssd_firmware_build_label[64]; /* [357:294] */
149+
__u8 die_in_use_bad_nand_block_raw[6]; /* [363:358] */
150+
__le16 die_in_use_bad_nand_block_normalized; /* [365:364] */
151+
__u8 rsvd358[128]; /* [493:358] */
150152
__le16 log_page_version; /* [495:494] */
151153
__u8 log_page_guid[16]; /* [511:496] */
152154
};

0 commit comments

Comments
 (0)