enum StatusCode {
Generic(GenericStatusCode),
Specific(SpecificStatusCode),
MediaAndDataIntegrityErrors(MADStatusCode),
PathRelated(PathStatusCode),
}
#[repr(u8)]
enum MADStatusCode {
WriteFault = 0x80,
UnrecoveredReadError,
EndToEndGuardCheckError,
EndToEndAppTagCheckError,
EndToEndRefTagCheckError,
CompareFailure,
AccessDenied,
DeallocatedOrUnwrittenLogicalBlock,
EndToEndStorageTagCheckError,
}
#[repr(u8)]
enum PathStatusCode {
InternalPathError,
AsymetricAccessPersistentLoss,
AsymetricAccessInaccessible,
AsymetricAccessTransition,
ControllerPathingError = 0x60,
HostPathingError = 0x70,
CommandAbortedByHost,
ConflictingAttributes = 0x80,
InvalidProtectionInfo,
WriteToReadOnlyRange,
CommandSizeLimitExceeded,
ZonedBoundaryError = 0xb8,
ZoneFull,
ZoneReadOnly,
ZoneOffline,
ZoneInvalidWrite,
TooManyActiveZones,
TooManyOpenZones,
InvalidZoneStateTransition,
}
#[repr(u8)]
enum GenericStatusCode {
Success,
InvalidOpcode,
InvalidField,
CommandIdConflict,
DataTransferError,
PowerLoss,
InternalError,
CommandAbortRequested,
CommandAbortSQDeleted,
CommandAbortFuseFailed,
CommandAbortMissingFuse,
InvalidNamespaceOrFormat,
CommandSequenceError,
InvalidSGLSegmentDescriptor,
InvalidNumberOfSGLDescriptors,
DataSGLLengthInvalid,
MetadataSGLLengthInvalid,
SGLDescriptorTypeInvalid,
InvalidUseOfControllerMemBuffer,
PRPOffsetInvalid,
AtomicWriteUnitExceeded,
OperationDenied,
SGLOffsetInvalid,
Reserved0 = 0x17,
HostIDInconsistentFormat,
KeepAliveTimeout,
KeepAliveTimeoutInvalid,
PreemptAndAbort,
SanitizeFailed,
SanitizeInProgress,
SGLDataBlockGranularityInvalid,
CommandNotSupportedForQueueInCMB,
NamespaceWriteProtected,
CommandInterrupted,
TransientTransportError,
CommandProhibitedByLockdown,
AdminCommandMediaNotReady,
LBACutOfRange = 0x80,
CapacityExceeded,
NamespaceNotReady,
ReservationConflict,
FormatInProgress,
InvalidValueSize,
InvalidKeySize,
KVKeyDoesNotExist,
UnrecoveredError,
KeyExists,
}
#[repr(u8)]
enum SpecificStatusCode {
CompletionQueueInvalid,
InvalidQueueID,
InvalidQueueSize,
AbortCommandLimitExceeded,
Reserved0,
AsyncEventRequestLimitExceeded,
InvalidFirmwareSlot,
InvalidLogPage,
InvalidFormat,
FirmwareActivationRequiresReset,
InvalidQueueDeletion,
FeatureIDNotSavable,
FeatureNotChangeable,
FeatureNotNamespaceSpecific,
FirmwareActivationRequiresNVMSubsystemReset,
FirmwareActivationRequiresControllerReset,
FirmwareActivationRequiresMaximumTimeViolation,
FirmwareActivationProhibited,
OverlappingRange,
NamespaceInsufficientCapacity,
NamespaceIDUnavailable,
Reserved1 = 0x17,
NamespaceAlreadyAttached,
NamespaceIsPrivate,
NamespaceNotAttached,
ThinProvisioningNotSupported,
ControllerListInvalid,
DeviceSelfTestInProgress,
BootPartitionWriteProhibited,
InvalidControllerID,
InvalidSecondaryControllerState,
InvalidNumberOfControllerResources,
InvalidResourceIdentifier,
SanitizeProhibitedWhileNVMEnabled,
ANAGroupIDInvalid,
ANAAttachFailed,
InsufficientCapacity,
NamespaceAttachmentLimitExceeded,
ProhibitionOfCommandExecutionNotSupported,
IOCommandSetNotSupported,
IOCommandSetNotEnabled,
IOCommandSetCombinationRejected,
InvalidIOCommandSet,
IdentifierUnavailable,
ConflictingAttributes = 0x80,
InvalidProtectionInfo,
WriteToReadOnlyRange,
CommandSizeLimitExceeded,
ZonedBoundaryError = 0xb8,
ZoneFull,
ZoneReadOnly,
ZoneOffline,
ZoneInvalidWrite,
TooManyActiveZones,
TooManyOpenZones,
InvalidZoneStateTransition,
}