]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
mi: Add extended MI response status values
authorJeremy Kerr <jk@codeconstruct.com.au>
Thu, 7 Jul 2022 05:55:34 +0000 (13:55 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Thu, 7 Jul 2022 05:55:34 +0000 (13:55 +0800)
We'll want to make further use of the MI status values in an upcoming
change, so add the full set of values from NVMe-MI v1.2b.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
src/nvme/mi.h

index 17444ddb94798e742cf3f37b4f81bd4d32c88bd2..8bbd5615a149221d3654773c41dad211912688d8 100644 (file)
@@ -116,6 +116,17 @@ enum nvme_mi_ror {
  * @NVME_MI_RESP_INVALID_CMD_SIZE: Invalid command size
  * @NVME_MI_RESP_INVALID_INPUT_SIZE: Invalid command input data size
  * @NVME_MI_RESP_ACCESS_DENIED: Access Denied
+ * @NVME_MI_RESP_VPD_UPDATES_EXCEEDED: More VPD updates than allowed
+ * @NVME_MI_RESP_PCIE_INACCESSIBLE: PCIe functionality currently unavailable
+ * @NVME_MI_RESP_MEB_SANITIZED: MEB has been cleared due to sanitize
+ * @NVME_MI_RESP_ENC_SERV_FAILURE: Enclosure services process failed
+ * @NVME_MI_RESP_ENC_SERV_XFER_FAILURE: Transfer with enclosure services failed
+ * @NVME_MI_RESP_ENC_FAILURE: Unreoverable enclosure failure
+ * @NVME_MI_RESP_ENC_XFER_REFUSED: Enclosure services transfer refused
+ * @NVME_MI_RESP_ENC_FUNC_UNSUP: Unsupported enclosure services function
+ * @NVME_MI_RESP_ENC_SERV_UNAVAIL: Enclosure services unavailable
+ * @NVME_MI_RESP_ENC_DEGRADED: Noncriticial failure detected by enc. services
+ * @NVME_MI_RESP_SANITIZE_IN_PROGRESS: Command prohibited during sanitize
  */
 enum nvme_mi_resp_status {
        NVME_MI_RESP_SUCCESS = 0x00,
@@ -126,6 +137,20 @@ enum nvme_mi_resp_status {
        NVME_MI_RESP_INVALID_CMD_SIZE = 0x05,
        NVME_MI_RESP_INVALID_INPUT_SIZE = 0x06,
        NVME_MI_RESP_ACCESS_DENIED = 0x07,
+       /* 0x08 - 0x1f: reserved */
+       NVME_MI_RESP_VPD_UPDATES_EXCEEDED = 0x20,
+       NVME_MI_RESP_PCIE_INACCESSIBLE = 0x21,
+       NVME_MI_RESP_MEB_SANITIZED = 0x22,
+       NVME_MI_RESP_ENC_SERV_FAILURE = 0x23,
+       NVME_MI_RESP_ENC_SERV_XFER_FAILURE = 0x24,
+       NVME_MI_RESP_ENC_FAILURE = 0x25,
+       NVME_MI_RESP_ENC_XFER_REFUSED = 0x26,
+       NVME_MI_RESP_ENC_FUNC_UNSUP = 0x27,
+       NVME_MI_RESP_ENC_SERV_UNAVAIL = 0x28,
+       NVME_MI_RESP_ENC_DEGRADED = 0x29,
+       NVME_MI_RESP_SANITIZE_IN_PROGRESS = 0x2a,
+       /* 0x2b - 0xdf: reserved */
+       /* 0xe0 - 0xff: vendor specific */
 };
 
 /**