Skip to content

Commit 6a7b777

Browse files
francispravin5igaw
authored andcommitted
types: Add ETPVDS and SSI fields of sanitize status log
Add Estimated Time For Post-Verification Deallocation State (ETPVDS) and Sanitize State Information (SSI) fields of sanitize status log. TP4152 - Post-Sanitize Media Verification 2024.04.01 Ratified. Signed-off-by: Francis Pravin <[email protected]>
1 parent 6f13888 commit 6a7b777

1 file changed

Lines changed: 69 additions & 2 deletions

File tree

src/nvme/types.h

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4895,7 +4895,15 @@ enum nvme_resv_notify_rnlpt {
48954895
* to be completed in the background when the Sanitize command that
48964896
* started that operation is completed. A value of FFFFFFFFh indicates
48974897
* that no time period is reported.
4898-
* @rsvd32: Reserved
4898+
* @etpvds: Estimated Time For Post-Verification Deallocation State: indicates the
4899+
* number of seconds required to deallocate all media allocated for user data
4900+
* after exiting the Media Verification state (i.e., the time difference between
4901+
* entering and exiting the Post-Verification Deallocation state), if that state
4902+
* is entered as part of the sanitize operation. A value of FFFFFFFFh indicates
4903+
* that no time period is reported.
4904+
* @ssi: Sanitize State Information: indicate the state of the Sanitize Operation
4905+
* State Machine.
4906+
* @rsvd37: Reserved
48994907
*/
49004908
struct nvme_sanitize_log_page {
49014909
__le16 sprog;
@@ -4907,7 +4915,9 @@ struct nvme_sanitize_log_page {
49074915
__le32 etond;
49084916
__le32 etbend;
49094917
__le32 etcend;
4910-
__u8 rsvd32[480];
4918+
__le32 etpvds;
4919+
__u8 ssi;
4920+
__u8 rsvd37[475];
49114921
};
49124922

49134923
/**
@@ -4951,6 +4961,10 @@ struct nvme_sanitize_log_page {
49514961
* the NVM subsystem has never been sanitized;
49524962
* or since the most recent successful sanitize
49534963
* operation.
4964+
* @NVME_SANITIZE_SSTAT_MVCNCLD_SHIFT: Shift amount to get the value of Media Verification
4965+
* Canceled bit of Sanitize status field.
4966+
* @NVME_SANITIZE_SSTAT_MVCNCLD_MASK: Mask to get the value of Media Verification Canceled
4967+
* bit of Sanitize status field.
49544968
*/
49554969
enum nvme_sanitize_sstat {
49564970
NVME_SANITIZE_SSTAT_STATUS_SHIFT = 0,
@@ -4965,6 +4979,59 @@ enum nvme_sanitize_sstat {
49654979
NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_SHIFT = 8,
49664980
NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_MASK = 0x1,
49674981
NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED = 1 << NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_SHIFT,
4982+
NVME_SANITIZE_SSTAT_MVCNCLD_SHIFT = 9,
4983+
NVME_SANITIZE_SSTAT_MVCNCLD_MASK = 0x1,
4984+
};
4985+
4986+
/**
4987+
* enum nvme_sanitize_ssi - Sanitize State Information (SSI)
4988+
* @NVME_SANITIZE_SSI_SANS_SHIFT: Shift amount to get the value of Sanitize State
4989+
* from Sanitize State Information (SSI) field.
4990+
* @NVME_SANITIZE_SSI_SANS_MASK: Mask to get the value of Sanitize State from
4991+
* Sanitize State Information (SSI) field.
4992+
* @NVME_SANITIZE_SSI_FAILS_SHIFT: Shift amount to get the value of Failure State
4993+
* from Sanitize State Information (SSI) field.
4994+
* @NVME_SANITIZE_SSI_FAILS_MASK: Mask to get the value of Failure State from
4995+
* Sanitize State Information (SSI) field.
4996+
* @NVME_SANITIZE_SSI_IDLE: No sanitize operation is in process.
4997+
* @NVME_SANITIZE_SSI_RESTRICT_PROCESSING: The Sanitize operation is in Restricted Processing
4998+
* State.
4999+
* @NVME_SANITIZE_SSI_RESTRICT_FAILURE: The Sanitize operation is in Restricted Failure
5000+
* State. This state is entered if sanitize processing
5001+
* was performed in the Restricted Processing state and
5002+
* sanitize processing failed or a failure occurred
5003+
* during deallocation of media allocated for user data
5004+
* in the Post-Verification Deallocation state.
5005+
* @NVME_SANITIZE_SSI_UNRESTRICT_PROCESSING: The Sanitize operation is in Unrestricted Processing
5006+
* State.
5007+
* @NVME_SANITIZE_SSI_UNRESTRICT_FAILURE: The Sanitize operation is in Unrestricted Failure
5008+
* State. This state is entered if sanitize processing
5009+
* was performed in the Unrestricted Processing state
5010+
* and sanitize processing failed or a failure occurred
5011+
* during deallocation of media allocated for user data
5012+
* in the Post-Verification.
5013+
* @NVME_SANITIZE_SSI_MEDIA_VERIFICATION: The Sanitize operation is in Media Verification
5014+
* State. In this state, the sanitize processing
5015+
* completed successfully, and all media allocated for
5016+
* user data in the sanitization target is readable by
5017+
* the host for purposes of verifying sanitization.
5018+
* @NVME_SANITIZE_SSI_POST_VERIF_DEALLOC: The Sanitize operation is in Post-Verification
5019+
* Deallocation State. In this state, the controller
5020+
* shall deallocate all media allocated for user data
5021+
* in the sanitization target.
5022+
*/
5023+
enum nvme_sanitize_ssi {
5024+
NVME_SANITIZE_SSI_SANS_SHIFT = 0,
5025+
NVME_SANITIZE_SSI_SANS_MASK = 0xf,
5026+
NVME_SANITIZE_SSI_FAILS_SHIFT = 4,
5027+
NVME_SANITIZE_SSI_FAILS_MASK = 0xf,
5028+
NVME_SANITIZE_SSI_IDLE = 0,
5029+
NVME_SANITIZE_SSI_RESTRICT_PROCESSING = 1,
5030+
NVME_SANITIZE_SSI_RESTRICT_FAILURE = 2,
5031+
NVME_SANITIZE_SSI_UNRESTRICT_PROCESSING = 3,
5032+
NVME_SANITIZE_SSI_UNRESTRICT_FAILURE = 4,
5033+
NVME_SANITIZE_SSI_MEDIA_VERIFICATION = 5,
5034+
NVME_SANITIZE_SSI_POST_VERIF_DEALLOC = 6,
49685035
};
49695036

49705037
/**

0 commit comments

Comments
 (0)