nvme/ds/status/
mod.rs

1#![allow(dead_code)]
2
3enum StatusCode {
4    Generic(GenericStatusCode),
5    Specific(SpecificStatusCode),
6    MediaAndDataIntegrityErrors(MADStatusCode),
7    PathRelated(PathStatusCode),
8}
9
10#[repr(u8)]
11enum MADStatusCode {
12    WriteFault = 0x80,
13    UnrecoveredReadError,
14    EndToEndGuardCheckError,
15    EndToEndAppTagCheckError,
16    EndToEndRefTagCheckError,
17    CompareFailure,
18    AccessDenied,
19    DeallocatedOrUnwrittenLogicalBlock,
20    EndToEndStorageTagCheckError,
21}
22
23#[repr(u8)]
24enum PathStatusCode {
25    InternalPathError,
26    AsymetricAccessPersistentLoss,
27    AsymetricAccessInaccessible,
28    AsymetricAccessTransition,
29    ControllerPathingError = 0x60,
30    HostPathingError = 0x70,
31    CommandAbortedByHost,
32    ConflictingAttributes = 0x80,
33    InvalidProtectionInfo,
34    WriteToReadOnlyRange,
35    CommandSizeLimitExceeded,
36
37    ZonedBoundaryError = 0xb8,
38    ZoneFull,
39    ZoneReadOnly,
40    ZoneOffline,
41    ZoneInvalidWrite,
42    TooManyActiveZones,
43    TooManyOpenZones,
44    InvalidZoneStateTransition,
45}
46
47#[repr(u8)]
48enum GenericStatusCode {
49    Success,
50    InvalidOpcode,
51    InvalidField,
52    CommandIdConflict,
53    DataTransferError,
54    PowerLoss,
55    InternalError,
56    CommandAbortRequested,
57    CommandAbortSQDeleted,
58    CommandAbortFuseFailed,
59    CommandAbortMissingFuse,
60    InvalidNamespaceOrFormat,
61    CommandSequenceError,
62    InvalidSGLSegmentDescriptor,
63    InvalidNumberOfSGLDescriptors,
64    DataSGLLengthInvalid,
65    MetadataSGLLengthInvalid,
66    SGLDescriptorTypeInvalid,
67    InvalidUseOfControllerMemBuffer,
68    PRPOffsetInvalid,
69    AtomicWriteUnitExceeded,
70    OperationDenied,
71    SGLOffsetInvalid,
72    Reserved0 = 0x17,
73    HostIDInconsistentFormat,
74    KeepAliveTimeout,
75    KeepAliveTimeoutInvalid,
76    PreemptAndAbort,
77    SanitizeFailed,
78    SanitizeInProgress,
79    SGLDataBlockGranularityInvalid,
80    CommandNotSupportedForQueueInCMB,
81    NamespaceWriteProtected,
82    CommandInterrupted,
83    TransientTransportError,
84    CommandProhibitedByLockdown,
85    AdminCommandMediaNotReady,
86    LBACutOfRange = 0x80,
87    CapacityExceeded,
88    NamespaceNotReady,
89    ReservationConflict,
90    FormatInProgress,
91    InvalidValueSize,
92    InvalidKeySize,
93    KVKeyDoesNotExist,
94    UnrecoveredError,
95    KeyExists,
96}
97
98#[repr(u8)]
99enum SpecificStatusCode {
100    CompletionQueueInvalid,
101    InvalidQueueID,
102    InvalidQueueSize,
103    AbortCommandLimitExceeded,
104    Reserved0,
105    AsyncEventRequestLimitExceeded,
106    InvalidFirmwareSlot,
107    InvalidLogPage,
108    InvalidFormat,
109    FirmwareActivationRequiresReset,
110    InvalidQueueDeletion,
111    FeatureIDNotSavable,
112    FeatureNotChangeable,
113    FeatureNotNamespaceSpecific,
114    FirmwareActivationRequiresNVMSubsystemReset,
115    FirmwareActivationRequiresControllerReset,
116    FirmwareActivationRequiresMaximumTimeViolation,
117    FirmwareActivationProhibited,
118    OverlappingRange,
119    NamespaceInsufficientCapacity,
120    NamespaceIDUnavailable,
121    Reserved1 = 0x17,
122    NamespaceAlreadyAttached,
123    NamespaceIsPrivate,
124    NamespaceNotAttached,
125    ThinProvisioningNotSupported,
126    ControllerListInvalid,
127    DeviceSelfTestInProgress,
128    BootPartitionWriteProhibited,
129    InvalidControllerID,
130    InvalidSecondaryControllerState,
131    InvalidNumberOfControllerResources,
132    InvalidResourceIdentifier,
133    SanitizeProhibitedWhileNVMEnabled,
134    ANAGroupIDInvalid,
135    ANAAttachFailed,
136    InsufficientCapacity,
137    NamespaceAttachmentLimitExceeded,
138    ProhibitionOfCommandExecutionNotSupported,
139    IOCommandSetNotSupported,
140    IOCommandSetNotEnabled,
141    IOCommandSetCombinationRejected,
142    InvalidIOCommandSet,
143    IdentifierUnavailable,
144    //TODO: Directive Specific
145    ConflictingAttributes = 0x80,
146    InvalidProtectionInfo,
147    WriteToReadOnlyRange,
148    CommandSizeLimitExceeded,
149
150    ZonedBoundaryError = 0xb8,
151    ZoneFull,
152    ZoneReadOnly,
153    ZoneOffline,
154    ZoneInvalidWrite,
155    TooManyActiveZones,
156    TooManyOpenZones,
157    InvalidZoneStateTransition,
158}