nvme: fix iocs status code values

The status codes related to I/O Command Sets are in the wrong group.

Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
Klaus Jensen 2024-12-16 13:53:05 +01:00
parent 9cf6ec0659
commit b202fb549d
2 changed files with 4 additions and 4 deletions

View file

@ -5681,7 +5681,7 @@ static uint16_t nvme_identify_ns(NvmeCtrl *n, NvmeRequest *req, bool active)
return nvme_c2h(n, (uint8_t *)&ns->id_ns, sizeof(NvmeIdNs), req); return nvme_c2h(n, (uint8_t *)&ns->id_ns, sizeof(NvmeIdNs), req);
} }
return NVME_INVALID_CMD_SET | NVME_DNR; return NVME_INVALID_IOCS | NVME_DNR;
} }
static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n, NvmeRequest *req, static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n, NvmeRequest *req,
@ -6647,7 +6647,7 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req)
case NVME_COMMAND_SET_PROFILE: case NVME_COMMAND_SET_PROFILE:
if (dw11 & 0x1ff) { if (dw11 & 0x1ff) {
trace_pci_nvme_err_invalid_iocsci(dw11 & 0x1ff); trace_pci_nvme_err_invalid_iocsci(dw11 & 0x1ff);
return NVME_CMD_SET_CMB_REJECTED | NVME_DNR; return NVME_IOCS_COMBINATION_REJECTED | NVME_DNR;
} }
break; break;
case NVME_FDP_MODE: case NVME_FDP_MODE:

View file

@ -906,8 +906,6 @@ enum NvmeStatusCodes {
NVME_SGL_DESCR_TYPE_INVALID = 0x0011, NVME_SGL_DESCR_TYPE_INVALID = 0x0011,
NVME_INVALID_USE_OF_CMB = 0x0012, NVME_INVALID_USE_OF_CMB = 0x0012,
NVME_INVALID_PRP_OFFSET = 0x0013, NVME_INVALID_PRP_OFFSET = 0x0013,
NVME_CMD_SET_CMB_REJECTED = 0x002b,
NVME_INVALID_CMD_SET = 0x002c,
NVME_FDP_DISABLED = 0x0029, NVME_FDP_DISABLED = 0x0029,
NVME_INVALID_PHID_LIST = 0x002a, NVME_INVALID_PHID_LIST = 0x002a,
NVME_LBA_RANGE = 0x0080, NVME_LBA_RANGE = 0x0080,
@ -940,6 +938,8 @@ enum NvmeStatusCodes {
NVME_INVALID_SEC_CTRL_STATE = 0x0120, NVME_INVALID_SEC_CTRL_STATE = 0x0120,
NVME_INVALID_NUM_RESOURCES = 0x0121, NVME_INVALID_NUM_RESOURCES = 0x0121,
NVME_INVALID_RESOURCE_ID = 0x0122, NVME_INVALID_RESOURCE_ID = 0x0122,
NVME_IOCS_COMBINATION_REJECTED = 0x012b,
NVME_INVALID_IOCS = 0x012c,
NVME_CONFLICTING_ATTRS = 0x0180, NVME_CONFLICTING_ATTRS = 0x0180,
NVME_INVALID_PROT_INFO = 0x0181, NVME_INVALID_PROT_INFO = 0x0181,
NVME_WRITE_TO_RO = 0x0182, NVME_WRITE_TO_RO = 0x0182,