Skip to content

Commit 5f3a369

Browse files
francispravin5igaw
authored andcommitted
nvme: add the new Self-test Code of Device Self-test command
Add the new Self-test Code (SCT) Host-Initiated Refresh operation support to Device Self-test command. Also, add it in the Device Self-test Log Page. TP4058 - Environmental Extremes Management. Signed-off-by: Francis Pravin <[email protected]>
1 parent c164a0f commit 5f3a369

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nvme-print-stdout.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4341,6 +4341,9 @@ static void stdout_self_test_result(struct nvme_st_result *res)
43414341
case NVME_ST_CODE_EXTENDED:
43424342
printf(" Extended device self-test operation");
43434343
break;
4344+
case NVME_ST_CODE_HOST_INIT:
4345+
printf(" Host-Initiated Refresh operation");
4346+
break;
43444347
case NVME_ST_CODE_VS:
43454348
printf(" Vendor specific");
43464349
break;

nvme.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4429,6 +4429,7 @@ static int device_self_test(int argc, char **argv, struct command *cmd, struct p
44294429
"0h Show current state of device self-test operation\n"
44304430
"1h Start a short device self-test operation\n"
44314431
"2h Start a extended device self-test operation\n"
4432+
"3h Start a Host-Initiated Refresh operation\n"
44324433
"eh Start a vendor specific device self-test operation\n"
44334434
"fh Abort the device self-test operation";
44344435
const char *wait = "Wait for the test to finish";
@@ -4501,6 +4502,8 @@ static int device_self_test(int argc, char **argv, struct command *cmd, struct p
45014502
printf("Extended Device self-test started\n");
45024503
else if (cfg.stc == NVME_ST_CODE_SHORT)
45034504
printf("Short Device self-test started\n");
4505+
else if (cfg.stc == NVME_ST_CODE_HOST_INIT)
4506+
printf("Host-Initiated Refresh started\n");
45044507

45054508
if (cfg.wait && cfg.stc != NVME_ST_CODE_ABORT)
45064509
err = wait_self_test(dev);

0 commit comments

Comments
 (0)