summaryrefslogtreecommitdiffstats
path: root/linux/nvme.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-20 07:04:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-20 07:04:31 +0000
commit727de41af97db70722cfc1898ebb027b9e339969 (patch)
tree990f71500c8feeb9f437c5021522ebaff3915141 /linux/nvme.h
parentAdding upstream version 1.15. (diff)
downloadnvme-cli-727de41af97db70722cfc1898ebb027b9e339969.tar.xz
nvme-cli-727de41af97db70722cfc1898ebb027b9e339969.zip
Adding upstream version 1.16.upstream/1.16
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--linux/nvme.h103
1 files changed, 86 insertions, 17 deletions
diff --git a/linux/nvme.h b/linux/nvme.h
index 589108b..db1e4ac 100644
--- a/linux/nvme.h
+++ b/linux/nvme.h
@@ -429,11 +429,24 @@ struct nvme_id_ns {
__le16 endgid;
__u8 nguid[16];
__u8 eui64[8];
- struct nvme_lbaf lbaf[16];
- __u8 rsvd192[192];
+ struct nvme_lbaf lbaf[64];
__u8 vs[3712];
};
+struct nvme_cmd_set_independent_id_ns {
+ __u8 nsfeat;
+ __u8 nmic;
+ __u8 rescap;
+ __u8 fpi;
+ __le32 anagrpid;
+ __u8 nsattr;
+ __u8 rsvd9;
+ __le16 nvmsetid;
+ __le16 endgid;
+ __u8 nstat;
+ __u8 rsvd15[4081];
+};
+
struct nvme_id_iocs {
__le64 iocs[NVME_NUM_IOCS_COMBINATIONS];
};
@@ -447,6 +460,7 @@ enum {
NVME_ID_CNS_CSI_ID_NS = 0x05,
NVME_ID_CNS_CSI_ID_CTRL = 0x06,
NVME_ID_CNS_CSI_NS_ACTIVE_LIST = 0x07,
+ NVME_ID_CNS_CS_INDEPENDENT_ID_NS = 0x08,
NVME_ID_CNS_NS_PRESENT_LIST = 0x10,
NVME_ID_CNS_NS_PRESENT = 0x11,
NVME_ID_CNS_CTRL_NS_LIST = 0x12,
@@ -456,6 +470,7 @@ enum {
NVME_ID_CNS_NS_GRANULARITY = 0x16,
NVME_ID_CNS_UUID_LIST = 0x17,
NVME_ID_CNS_DOMAIN_LIST = 0x18,
+ NVME_ID_CNS_ENDURANCE_GROUP_ID = 0x19,
NVME_ID_CNS_CSI_NS_PRESENT_LIST = 0x1a,
NVME_ID_CNS_CSI_NS_PRESENT = 0x1b,
NVME_ID_CNS_CSI = 0x1c,
@@ -561,6 +576,7 @@ struct nvme_id_uuid_list {
* @dalb1: Data area 1 last block
* @dalb2: Data area 2 last block
* @dalb3: Data area 3 last block
+ * @dalb4: Data area 4 last block
* @ctrlavail: Controller initiated data available
* @ctrldgn: Controller initiated telemetry Data Generation Number
* @rsnident: Reason Identifier
@@ -576,7 +592,9 @@ struct nvme_telemetry_log_page_hdr {
__le16 dalb1;
__le16 dalb2;
__le16 dalb3;
- __u8 rsvd1[368];
+ __u8 rsvd1[2];
+ __le32 dalb4;
+ __u8 rsvd2[362];
__u8 ctrlavail;
__u8 ctrldgn;
__u8 rsnident[128];
@@ -873,7 +891,9 @@ struct nvme_persistent_event_log_head {
__u8 sn[20];
__u8 mn[40];
__u8 subnqn[256];
- __u8 rsvd372[108];
+ __le16 gen_number;
+ __le32 rci;
+ __u8 rsvd378[102];
__u8 supp_event_bm[32];
} __attribute__((packed));
@@ -956,6 +976,13 @@ struct nvme_resv_notif_log {
__u8 rsvd16[48];
};
+struct nvme_boot_part_hdr {
+ __u8 lid;
+ __u8 rsvd1[3];
+ __le32 bpinfo;
+ __u8 rsvd8[8];
+};
+
enum {
NVME_SMART_CRIT_SPARE = 1 << 0,
NVME_SMART_CRIT_TEMPERATURE = 1 << 1,
@@ -1258,6 +1285,7 @@ enum nvme_admin_opcode {
nvme_admin_nvme_mi_send = 0x1d,
nvme_admin_nvme_mi_recv = 0x1e,
nvme_admin_capacity_mgmt = 0x20,
+ nvme_admin_lockdown_cmd = 0x24,
nvme_admin_dbbuf = 0x7C,
nvme_admin_format_nvm = 0x80,
nvme_admin_security_send = 0x81,
@@ -1273,6 +1301,7 @@ enum {
NVME_SQ_PRIO_HIGH = (1 << 1),
NVME_SQ_PRIO_MEDIUM = (2 << 1),
NVME_SQ_PRIO_LOW = (3 << 1),
+ NVME_LOG_SUPPORTED_PAGES = 0x00,
NVME_LOG_ERROR = 0x01,
NVME_LOG_SMART = 0x02,
NVME_LOG_FW_SLOT = 0x03,
@@ -1288,6 +1317,8 @@ enum {
NVME_LOG_PERSISTENT_EVENT = 0x0d,
NVME_LOG_LBA_STATUS = 0x0e,
NVME_LOG_ENDURANCE_GROUP_EVENT_AGG = 0x0f,
+ NVME_LOG_BOOT_PARTITION = 0x15,
+ NVME_LOG_FID_SUPPORT_EFFECTS = 0x12,
NVME_LOG_DISC = 0x70,
NVME_LOG_RESERVATION = 0x80,
NVME_LOG_SANITIZE = 0x81,
@@ -1324,6 +1355,7 @@ enum nvme_feat {
NVME_FEAT_SANITIZE = 0x17,
NVME_FEAT_ENDURANCE = 0x18,
NVME_FEAT_IOCS_PROFILE = 0x19,
+ NVME_FEAT_SPINUP_CONTROL= 0x1a,
NVME_FEAT_SW_PROGRESS = 0x80,
NVME_FEAT_HOST_ID = 0x81,
NVME_FEAT_RESV_MASK = 0x82,
@@ -1573,6 +1605,11 @@ struct nvme_bar_cap {
__u8 rsvd_cmbs_pmrs;
};
+struct nvme_endurance_group_list {
+ __le16 num;
+ __le16 identifier[2047];
+};
+
/*
* is_64bit_reg - It checks whether given offset of the controller register is
* 64bit or not.
@@ -1793,15 +1830,16 @@ struct nvme_zns_lbafe {
};
/**
- * struct nvme_zns_id_ns -
- * @zoc:
- * @ozcs:
- * @mar:
- * @mor:
- * @rrl:
- * @frl:
- * @lbafe:
- * @vs:
+ * struct nvme_zns_id_ns - Zoned Namespace Command Set Specific
+ * Identify Namespace Data Structure
+ * @zoc: Zone Operation Characteristics
+ * @ozcs: Optional Zoned Command Support
+ * @mar: Maximum Active Resources
+ * @mor: Maximum Open Resources
+ * @rrl: Reset Recommended Limit
+ * @frl: Finish Recommended Limit
+ * @lbafe: LBA Format Extension
+ * @vs: Vendor Specific
*/
struct nvme_zns_id_ns {
__le16 zoc;
@@ -1810,9 +1848,14 @@ struct nvme_zns_id_ns {
__le32 mor;
__le32 rrl;
__le32 frl;
- __u8 rsvd20[2796];
- struct nvme_zns_lbafe lbafe[16];
- __u8 rsvd3072[768];
+ __le32 rrl1;
+ __le32 rrl2;
+ __le32 rrl3;
+ __le32 frl1;
+ __le32 frl2;
+ __le32 frl3;
+ __u8 rsvd44[2772];
+ struct nvme_zns_lbafe lbafe[64];
__u8 vs[256];
};
@@ -1885,7 +1928,8 @@ struct nvme_zns_desc {
__u8 zt;
__u8 zs;
__u8 za;
- __u8 rsvd3[5];
+ __u8 zai;
+ __u8 rsvd4[4];
__le64 zcap;
__le64 zslba;
__le64 wp;
@@ -1941,4 +1985,29 @@ struct nvme_id_domain_list {
struct nvme_id_domain_attr_entry domain_attr[];
};
+enum {
+ NVME_FID_EFFECTS_FSUPP = 1 << 0,
+ NVME_FID_EFFECTS_UDCC = 1 << 1,
+ NVME_FID_EFFECTS_NCC = 1 << 2,
+ NVME_FID_EFFECTS_NIC = 1 << 3,
+ NVME_FID_EFFECTS_CCC = 1 << 4,
+ NVME_FID_EFFECTS_UUID_SEL = 1 << 19,
+ NVME_FID_SCOPE_SHIFT = 20,
+ NVME_FID_SCOPE_MASK = 0xfff,
+ NVME_FID_SCOPE_NS = 1 << 0,
+ NVME_FID_SCOPE_CTRL = 1 << 1,
+ NVME_FID_SCOPE_NVM_SET = 1 << 2,
+ NVME_FID_SCOPE_ENDGRP = 1 << 3,
+ NVME_FID_SCOPE_DOMAIN = 1 << 4,
+ NVME_FID_SCOPE_NSS = 1 << 5,
+};
+
+struct nvme_fid_support_effects {
+ __le32 fid_support[256];
+};
+
+struct nvme_support_log_pages {
+ __le32 lid_support[256];
+};
+
#endif /* _LINUX_NVME_H */