Commit 5ce17cb8 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

nvme: Add new values to nvme_status_code enums based on NVMe 2.0c



Based on NVMe-2.0c, add newly added status codes to the corresponding
enums.

Status codes of 0x80 to 0xBF are different between I/O commands and
fabrics commands. 0x80 to 0xBF of enum spdk_nvme_command_specific_status_code
has been used for I/O commands. Hence, add status codes for I/O commands
for consistency.

Command specific status codes for fabrics commands will be considered
later.

Signed-off-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I8f549e76420ee72dcaf412c5941d74d8359761c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15833


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8c439a67
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -1434,6 +1434,11 @@ enum spdk_nvme_generic_command_status_code {
	SPDK_NVME_SC_NAMESPACE_NOT_READY		= 0x82,
	SPDK_NVME_SC_RESERVATION_CONFLICT               = 0x83,
	SPDK_NVME_SC_FORMAT_IN_PROGRESS                 = 0x84,
	SPDK_NVME_SC_INVALID_VALUE_SIZE			= 0x85,
	SPDK_NVME_SC_INVALID_KEY_SIZE			= 0x86,
	SPDK_NVME_SC_KV_KEY_DOES_NOT_EXIST		= 0x87,
	SPDK_NVME_SC_UNRECOVERED_ERROR			= 0x88,
	SPDK_NVME_SC_KEY_EXISTS				= 0x89,
};

/**
@@ -1475,17 +1480,32 @@ enum spdk_nvme_command_specific_status_code {
	SPDK_NVME_SC_INVALID_SECONDARY_CTRLR_STATE	= 0x20,
	SPDK_NVME_SC_INVALID_NUM_CTRLR_RESOURCES	= 0x21,
	SPDK_NVME_SC_INVALID_RESOURCE_ID		= 0x22,

	SPDK_NVME_SC_SANITIZE_PROHIBITED		= 0x23,
	SPDK_NVME_SC_ANA_GROUP_IDENTIFIER_INVALID	= 0x24,
	SPDK_NVME_SC_ANA_ATTACH_FAILED			= 0x25,
	SPDK_NVME_SC_INSUFFICIENT_CAPACITY		= 0x26,
	SPDK_NVME_SC_NAMESPACE_ATTACH_LIMIT_EXCEEDED	= 0x27,
	SPDK_NVME_SC_PROHIBIT_CMD_EXEC_NOT_SUPPORTED	= 0x28,
	SPDK_NVME_SC_IOCS_NOT_SUPPORTED			= 0x29,
	SPDK_NVME_SC_IOCS_NOT_ENABLED			= 0x2a,
	SPDK_NVME_SC_IOCS_COMBINATION_REJECTED		= 0x2b,
	SPDK_NVME_SC_INVALID_IOCS			= 0x2c,
	SPDK_NVME_SC_IDENTIFIER_UNAVAILABLE		= 0x2d,

	SPDK_NVME_SC_STREAM_RESOURCE_ALLOCATION_FAILED	= 0x7f,
	SPDK_NVME_SC_CONFLICTING_ATTRIBUTES		= 0x80,
	SPDK_NVME_SC_INVALID_PROTECTION_INFO		= 0x81,
	SPDK_NVME_SC_ATTEMPTED_WRITE_TO_RO_RANGE	= 0x82,
	SPDK_NVME_SC_CMD_SIZE_LIMIT_SIZE_EXCEEDED	= 0x83,

	SPDK_NVME_SC_ZONED_BOUNDARY_ERROR		= 0xb8,
	SPDK_NVME_SC_ZONE_IS_FULL			= 0xb9,
	SPDK_NVME_SC_ZONE_IS_READ_ONLY			= 0xba,
	SPDK_NVME_SC_ZONE_IS_OFFLINE			= 0xbb,
	SPDK_NVME_SC_ZONE_INVALID_WRITE			= 0xbc,
	SPDK_NVME_SC_TOO_MANY_ACTIVE_ZONES		= 0xbd,
	SPDK_NVME_SC_TOO_MANY_OPEN_ZONES		= 0xbe,
	SPDK_NVME_SC_INVALID_ZONE_STATE_TRANSITION	= 0xbf,
};

/**
@@ -1500,6 +1520,7 @@ enum spdk_nvme_media_error_status_code {
	SPDK_NVME_SC_COMPARE_FAILURE			= 0x85,
	SPDK_NVME_SC_ACCESS_DENIED			= 0x86,
	SPDK_NVME_SC_DEALLOCATED_OR_UNWRITTEN_BLOCK     = 0x87,
	SPDK_NVME_SC_END_TO_END_STORAGE_TAG_CHECK_ERROR	= 0x88,
};

/**