From 42905ca21c10c1fcc32107158c5642c657fac831 Mon Sep 17 00:00:00 2001 From: Dennis Maisenbacher Date: Tue, 23 Jun 2026 12:05:26 +0200 Subject: [PATCH 1/2] libnvme: fix NVME_SC_EXCEEDS_MAX_NS_SANITIZE status code value The Command Specific Status "Request Exceeds Maximum Namespace Sanitize Operations In Progress" is defined as 3Ch in Figure 103 of the NVM Express Base Specification 2.3, but was assigned 0x12, aliasing NVME_SC_FW_NEEDS_MAX_TIME (Firmware Activation Requires Maximum Time Violation). Signed-off-by: Dennis Maisenbacher --- libnvme/src/nvme/nvme-types-base.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libnvme/src/nvme/nvme-types-base.h b/libnvme/src/nvme/nvme-types-base.h index 39143bfebd..6caf134ab3 100644 --- a/libnvme/src/nvme/nvme-types-base.h +++ b/libnvme/src/nvme/nvme-types-base.h @@ -6563,7 +6563,6 @@ struct nvme_pull_model_ddc_req_log { * Maximum Time for Firmware Activation * (MTFA) value reported in Identify * Controller. - * @NVME_SC_EXCEEDS_MAX_NS_SANITIZE: Exceeds Max NS Sanitize Operations * @NVME_SC_FW_ACTIVATE_PROHIBITED: Firmware Activation Prohibited: The image * specified is being prohibited from * activation by the controller for vendor @@ -6669,6 +6668,7 @@ struct nvme_pull_model_ddc_req_log { * suspended. * @NVME_SC_CONTROLLER_DATA_QUEUE_FULL: The controller detected that a * Controller Data Queue became full. + * @NVME_SC_EXCEEDS_MAX_NS_SANITIZE: Exceeds Max NS Sanitize Operations * @NVME_SC_INVALID_POWER_LIMIT: Invalid Power Limit: The power limit * specified for the Power Limit feature is * invalid because that power limit prohibits @@ -6898,7 +6898,6 @@ enum nvme_status_field { NVME_SC_FW_NEEDS_SUBSYS_RESET = 0x10, NVME_SC_FW_NEEDS_RESET = 0x11, NVME_SC_FW_NEEDS_MAX_TIME = 0x12, - NVME_SC_EXCEEDS_MAX_NS_SANITIZE = 0x12, NVME_SC_FW_ACTIVATE_PROHIBITED = 0x13, NVME_SC_OVERLAPPING_RANGE = 0x14, NVME_SC_NS_INSUFFICIENT_CAP = 0x15, @@ -6950,6 +6949,11 @@ enum nvme_status_field { NVME_SC_CONTROLLER_NOT_SUSPENDED = 0x3A, NVME_SC_CONTROLLER_DATA_QUEUE_FULL = 0x3B, + /* + * Command Set Specific + */ + NVME_SC_EXCEEDS_MAX_NS_SANITIZE = 0x3c, + /* * Command Set Specific - Set Features */ From 506fca3ba4a1b944382e42d6296b10aed9f7c392 Mon Sep 17 00:00:00 2001 From: Dennis Maisenbacher Date: Tue, 23 Jun 2026 15:09:54 +0200 Subject: [PATCH 2/2] libnvme: remove duplicate NVME_SC_FEAT_IOCS_COMBINATION_REJECTED NVME_SC_FEAT_IOCS_COMBINATION_REJECTED was assigned 0x15, aliasing NVME_SC_NS_INSUFFICIENT_CAP, whereas Figure 103 of the NVM Express Base Specification 2.3 defines "I/O Command Set Combination Rejected" as 2Bh. The correctly-numbered NVME_SC_IOCS_COMBINATION_REJECTED (= 0x2b) already exists and represents the same status, so the misnumbered duplicate is redundant. Signed-off-by: Dennis Maisenbacher --- libnvme/src/nvme/nvme-types-base.h | 6 ------ libnvme/src/nvme/util.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libnvme/src/nvme/nvme-types-base.h b/libnvme/src/nvme/nvme-types-base.h index 6caf134ab3..ce2d17a96a 100644 --- a/libnvme/src/nvme/nvme-types-base.h +++ b/libnvme/src/nvme/nvme-types-base.h @@ -6572,11 +6572,6 @@ struct nvme_pull_model_ddc_req_log { * @NVME_SC_NS_INSUFFICIENT_CAP: Namespace Insufficient Capacity: Creating * the namespace requires more free space * than is currently available. - * @NVME_SC_FEAT_IOCS_COMBINATION_REJECTED: Set Features - I/O Command Set - * Combination Rejected: This error indicates - * that the controller did not accept the - * request to select the requested I/O - * Command Set Combination. * @NVME_SC_NS_ID_UNAVAILABLE: Namespace Identifier Unavailable: The * number of namespaces supported has been * exceeded. @@ -6901,7 +6896,6 @@ enum nvme_status_field { NVME_SC_FW_ACTIVATE_PROHIBITED = 0x13, NVME_SC_OVERLAPPING_RANGE = 0x14, NVME_SC_NS_INSUFFICIENT_CAP = 0x15, - NVME_SC_FEAT_IOCS_COMBINATION_REJECTED = 0x15, NVME_SC_NS_ID_UNAVAILABLE = 0x16, NVME_SC_NS_ALREADY_ATTACHED = 0x18, NVME_SC_NS_IS_PRIVATE = 0x19, diff --git a/libnvme/src/nvme/util.h b/libnvme/src/nvme/util.h index bd09f49468..fe3d1fb005 100644 --- a/libnvme/src/nvme/util.h +++ b/libnvme/src/nvme/util.h @@ -119,7 +119,7 @@ libnvme_set_features_status_to_string(__u16 sc) break; case NVME_SC_OVERLAPPING_RANGE: return "Overlapping Range: LBA range type data structure"; - case NVME_SC_FEAT_IOCS_COMBINATION_REJECTED: + case NVME_SC_IOCS_COMBINATION_REJECTED: return "I/O Command Set Combination Rejected"; case NVME_SC_INVALID_CONTROLER_DATA_QUEUE: break;