]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/nvme.h
nvme: check admin passthru command effects
[linux.git] / include / linux / nvme.h
index 87723c86f136f0e48c64a4c39fa9f0dcb3ad979d..fd1d4508a612902f08388d536704957e931f86a1 100644 (file)
@@ -267,6 +267,7 @@ enum {
        NVME_CTRL_OACS_SEC_SUPP                 = 1 << 0,
        NVME_CTRL_OACS_DIRECTIVES               = 1 << 5,
        NVME_CTRL_OACS_DBBUF_SUPP               = 1 << 8,
+       NVME_CTRL_LPA_CMD_EFFECTS_LOG           = 1 << 1,
 };
 
 struct nvme_lbaf {
@@ -395,6 +396,21 @@ struct nvme_fw_slot_info_log {
        __u8                    rsvd64[448];
 };
 
+enum {
+       NVME_CMD_EFFECTS_CSUPP          = 1 << 0,
+       NVME_CMD_EFFECTS_LBCC           = 1 << 1,
+       NVME_CMD_EFFECTS_NCC            = 1 << 2,
+       NVME_CMD_EFFECTS_NIC            = 1 << 3,
+       NVME_CMD_EFFECTS_CCC            = 1 << 4,
+       NVME_CMD_EFFECTS_CSE_MASK       = 3 << 16,
+};
+
+struct nvme_effects_log {
+       __le32 acs[256];
+       __le32 iocs[256];
+       __u8   resv[2048];
+};
+
 enum {
        NVME_SMART_CRIT_SPARE           = 1 << 0,
        NVME_SMART_CRIT_TEMPERATURE     = 1 << 1,
@@ -471,12 +487,14 @@ enum nvme_opcode {
  *
  * @NVME_SGL_FMT_ADDRESS:     absolute address of the data block
  * @NVME_SGL_FMT_OFFSET:      relative offset of the in-capsule data block
+ * @NVME_SGL_FMT_TRANSPORT_A: transport defined format, value 0xA
  * @NVME_SGL_FMT_INVALIDATE:  RDMA transport specific remote invalidation
  *                            request subtype
  */
 enum {
        NVME_SGL_FMT_ADDRESS            = 0x00,
        NVME_SGL_FMT_OFFSET             = 0x01,
+       NVME_SGL_FMT_TRANSPORT_A        = 0x0A,
        NVME_SGL_FMT_INVALIDATE         = 0x0f,
 };
 
@@ -490,12 +508,16 @@ enum {
  *
  * For struct nvme_keyed_sgl_desc:
  *   @NVME_KEY_SGL_FMT_DATA_DESC:      keyed data block descriptor
+ *
+ * Transport-specific SGL types:
+ *   @NVME_TRANSPORT_SGL_DATA_DESC:    Transport SGL data dlock descriptor
  */
 enum {
        NVME_SGL_FMT_DATA_DESC          = 0x00,
        NVME_SGL_FMT_SEG_DESC           = 0x02,
        NVME_SGL_FMT_LAST_SEG_DESC      = 0x03,
        NVME_KEY_SGL_FMT_DATA_DESC      = 0x04,
+       NVME_TRANSPORT_SGL_DATA_DESC    = 0x05,
 };
 
 struct nvme_sgl_desc {
@@ -675,6 +697,7 @@ enum nvme_admin_opcode {
        nvme_admin_format_nvm           = 0x80,
        nvme_admin_security_send        = 0x81,
        nvme_admin_security_recv        = 0x82,
+       nvme_admin_sanitize_nvm         = 0x84,
 };
 
 enum {
@@ -706,6 +729,7 @@ enum {
        NVME_LOG_ERROR          = 0x01,
        NVME_LOG_SMART          = 0x02,
        NVME_LOG_FW_SLOT        = 0x03,
+       NVME_LOG_CMD_EFFECTS    = 0x05,
        NVME_LOG_DISC           = 0x70,
        NVME_LOG_RESERVATION    = 0x80,
        NVME_FWACT_REPL         = (0 << 3),
@@ -1127,19 +1151,6 @@ enum {
        NVME_SC_UNWRITTEN_BLOCK         = 0x287,
 
        NVME_SC_DNR                     = 0x4000,
-
-
-       /*
-        * FC Transport-specific error status values for NVME commands
-        *
-        * Transport-specific status code values must be in the range 0xB0..0xBF
-        */
-
-       /* Generic FC failure - catchall */
-       NVME_SC_FC_TRANSPORT_ERROR      = 0x00B0,
-
-       /* I/O failure due to FC ABTS'd */
-       NVME_SC_FC_TRANSPORT_ABORTED    = 0x00B1,
 };
 
 struct nvme_completion {