]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Fill out additional documentation fields
authorKeith Busch <kbusch@kernel.org>
Thu, 27 Feb 2020 18:21:30 +0000 (10:21 -0800)
committerKeith Busch <kbusch@kernel.org>
Thu, 27 Feb 2020 18:21:30 +0000 (10:21 -0800)
Signed-off-by: Keith Busch <kbusch@kernel.org>
doc/libnvme.rst
src/nvme/fabrics.h
src/nvme/ioctl.h
src/nvme/tree.h
src/nvme/types.h
src/nvme/util.h

index e6493348fa910c5860627323cd74f17b1fd5d69c..d52462fd5a664222aa8441d156eeda92f6bfc6f4 100644 (file)
@@ -1,3 +1,87 @@
+.. c:function:: int nvme_namespace_filter (const struct dirent * d)
+
+
+**Parameters**
+
+``const struct dirent * d``
+
+
+.. c:function:: int nvme_paths_filter (const struct dirent * d)
+
+
+**Parameters**
+
+``const struct dirent * d``
+
+
+.. c:function:: int nvme_ctrls_filter (const struct dirent * d)
+
+
+**Parameters**
+
+``const struct dirent * d``
+
+
+.. c:function:: int nvme_subsys_filter (const struct dirent * d)
+
+
+**Parameters**
+
+``const struct dirent * d``
+
+
+.. c:function:: int nvme_scan_subsystems (struct dirent *** subsys)
+
+
+**Parameters**
+
+``struct dirent *** subsys``
+
+
+.. c:function:: int nvme_scan_subsystem_ctrls (nvme_subsystem_t s, struct dirent *** ctrls)
+
+
+**Parameters**
+
+``nvme_subsystem_t s``
+  *undescribed*
+
+``struct dirent *** ctrls``
+
+
+.. c:function:: int nvme_scan_subsystem_namespaces (nvme_subsystem_t s, struct dirent *** namespaces)
+
+
+**Parameters**
+
+``nvme_subsystem_t s``
+  *undescribed*
+
+``struct dirent *** namespaces``
+
+
+.. c:function:: int nvme_scan_ctrl_namespace_paths (nvme_ctrl_t c, struct dirent *** namespaces)
+
+
+**Parameters**
+
+``nvme_ctrl_t c``
+  *undescribed*
+
+``struct dirent *** namespaces``
+
+
+.. c:function:: int nvme_scan_ctrl_namespaces (nvme_ctrl_t c, struct dirent *** namespaces)
+
+
+**Parameters**
+
+``nvme_ctrl_t c``
+  *undescribed*
+
+``struct dirent *** namespaces``
+
+
 
 
 .. c:type:: struct nvme_passthru_cmd
@@ -199,8 +283,8 @@ Uses NVME_IOCTL_ADMIN64_CMD for the ioctl request.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_admin_passthru64 (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void * data, __u32 metadata_len, void * metadata, __u32 timeout_ms, __u64 * result)
@@ -275,8 +359,8 @@ Known values for **opcode** are defined in :c:type:`enum nvme_admin_opcode <nvme
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_submit_admin_passthru (int fd, struct nvme_passthru_cmd * cmd, __u32 * result)
@@ -300,8 +384,8 @@ Uses NVME_IOCTL_ADMIN_CMD for the ioctl request.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_admin_passthru (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void * data, __u32 metadata_len, void * metadata, __u32 timeout_ms, __u32 * result)
@@ -376,8 +460,8 @@ Known values for **opcode** are defined in :c:type:`enum nvme_admin_opcode <nvme
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_submit_io_passthru64 (int fd, struct nvme_passthru_cmd64 * cmd, __u64 * result)
@@ -401,8 +485,8 @@ Uses NVME_IOCTL_IO64_CMD for the ioctl request.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_io_passthru64 (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void * data, __u32 metadata_len, void * metadata, __u32 timeout_ms, __u64 * result)
@@ -477,8 +561,8 @@ Known values for **opcode** are defined in :c:type:`enum nvme_io_opcode <nvme_io
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_submit_io_passthru (int fd, struct nvme_passthru_cmd * cmd, __u32 * result)
@@ -502,8 +586,8 @@ Uses NVME_IOCTL_IO_CMD for the ioctl request.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_io_passthru (int fd, __u8 opcode, __u8 flags, __u16 rsvd, __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11, __u32 cdw12, __u32 cdw13, __u32 cdw14, __u32 cdw15, __u32 data_len, void * data, __u32 metadata_len, void * metadata, __u32 timeout_ms, __u32 * result)
@@ -578,8 +662,8 @@ Known values for **opcode** are defined in :c:type:`enum nvme_io_opcode <nvme_io
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_subsystem_reset (int fd)
@@ -598,7 +682,7 @@ This should only be sent to controller handles, not to namespaces.
 **Return**
 
 Zero if a subsystem reset was initiated or -1 with errno set
-        otherwise.
+otherwise.
 
 
 .. c:function:: int nvme_ctrl_reset (int fd)
@@ -616,7 +700,7 @@ This should only be sent to controller handles, not to namespaces.
 
 **Return**
 
-Zero if a reset was initiated or -1 with errno set otherwise.
+0 if a reset was initiated or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_ns_rescan (int fd)
@@ -634,7 +718,7 @@ This should only be sent to controller handles, not to namespaces.
 
 **Return**
 
-Zero if a rescan was initiated or -1 with errno set otherwise.
+0 if a rescan was initiated or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_nsid (int fd)
@@ -653,7 +737,7 @@ This should only be sent to namespace handles, not to controllers.
 **Return**
 
 The namespace identifier if a succecssful or -1 with errno set
-        otherwise.
+otherwise.
 
 
 
@@ -946,7 +1030,7 @@ The namespace identifier if a succecssful or -1 with errno set
 ``NVME_FEAT_FID_RESV_MASK``
   *undescribed*
 
-``NVME_FEAT_RESV_PERSIST``
+``NVME_FEAT_FID_RESV_PERSIST``
   *undescribed*
 
 ``NVME_FEAT_FID_WRITE_PROTECT``
@@ -1249,8 +1333,8 @@ the NVM subsystem, the controller or the namespace(s).
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_ctrl (int fd, struct nvme_id_ctrl * id)
@@ -1274,8 +1358,8 @@ See :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>` for details on the data returne
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_ns (int fd, __u32 nsid, struct nvme_id_ns * ns)
@@ -1308,8 +1392,8 @@ See :c:type:`struct nvme_id_ns <nvme_id_ns>` for details on the structure return
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_allocated_ns (int fd, __u32 nsid, struct nvme_id_ns * ns)
@@ -1329,8 +1413,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_active_ns_list (int fd, __u32 nsid, struct nvme_ns_list * list)
@@ -1358,8 +1442,8 @@ See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the retur
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_allocated_ns_list (int fd, __u32 nsid, struct nvme_ns_list * list)
@@ -1387,8 +1471,8 @@ See :c:type:`struct nvme_ns_list <nvme_ns_list>` for the definition of the retur
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_ctrl_list (int fd, __u16 cntid, struct nvme_ctrl_list * ctrlist)
@@ -1416,8 +1500,8 @@ See :c:type:`struct nvme_ctrl_list <nvme_ctrl_list>` for a definition of the str
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_nsid_ctrl_list (int fd, __u32 nsid, __u16 cntid, struct nvme_ctrl_list * ctrlist)
@@ -1447,8 +1531,8 @@ See :c:type:`struct nvme_ctrl_list <nvme_ctrl_list>` for a definition of the str
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1
 
 
 .. c:function:: int nvme_identify_ns_descs (int fd, __u32 nsid, struct nvme_ns_id_desc * descs)
@@ -1478,8 +1562,8 @@ See :c:type:`struct nvme_ns_id_desc <nvme_ns_id_desc>` for the definition of the
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_nvmset_list (int fd, __u16 nvmsetid, struct nvme_id_nvmset_list * nvmset)
@@ -1508,8 +1592,8 @@ See :c:type:`struct nvme_id_nvmset_list <nvme_id_nvmset_list>` for the defintion
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_primary_ctrl (int fd, __u16 cntid, struct nvme_primary_ctrl_cap * cap)
@@ -1532,8 +1616,8 @@ See :c:type:`struct nvme_primary_ctrl_cap <nvme_primary_ctrl_cap>` for the defin
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_secondary_ctrl_list (int fd, __u16 cntid, struct nvme_secondary_ctrl_list * list)
@@ -1563,8 +1647,8 @@ structure.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_ns_granularity (int fd, struct nvme_id_ns_granularity_list * list)
@@ -1590,8 +1674,8 @@ structure.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_identify_uuid (int fd, struct nvme_id_uuid_list * list)
@@ -1615,8 +1699,8 @@ See :c:type:`struct nvme_id_uuid_list <nvme_id_uuid_list>` for the definition of
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log (int fd, enum nvme_cmd_get_log_lid lid, __u32 nsid, __u64 lpo, __u8 lsp, __u16 lsi, bool rae, __u8 uuidx, __u32 len, void * log)
@@ -1657,8 +1741,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_error (int fd, unsigned nr_entries, bool rae, struct nvme_error_log_page * log)
@@ -1687,8 +1771,8 @@ particular command.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_smart (int fd, __u32 nsid, bool rae, struct nvme_smart_log * log)
@@ -1720,8 +1804,8 @@ the LPA field in the Identify Controller data structure.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_fw_slot (int fd, bool rae, struct nvme_firmware_slot * log)
@@ -1747,8 +1831,8 @@ string. The log page also indicates the active slot number.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_changed_ns_list (int fd, bool rae, struct nvme_ns_list * log)
@@ -1774,8 +1858,8 @@ added, or deleted.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_cmd_effects (int fd, struct nvme_cmd_effects_log * log)
@@ -1797,8 +1881,8 @@ and the effects of those commands on the state of the NVM subsystem.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_device_self_test (int fd, struct nvme_self_test_log * log)
@@ -1821,8 +1905,8 @@ self-test operations.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_create_telemetry_host (int fd, struct nvme_telemetry_log * log)
@@ -1861,8 +1945,8 @@ using the previously existing capture.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_telemetry_ctrl (int fd, bool rae, __u64 offset, __u32 len, void * log)
@@ -1911,8 +1995,8 @@ page.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_predictable_lat_nvmset (int fd, __u16 nvmsetid, struct nvme_nvmset_predictable_lat_log * log)
@@ -1930,8 +2014,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_predictable_lat_event (int fd, bool rae, __u32 offset, __u32 len, void * log)
@@ -1955,6 +2039,20 @@ The nvme command status if a response was received (see :c:type:`enum
   *undescribed*
 
 
+
+
+.. c:type:: enum nvme_log_ana_lsp
+
+
+**Constants**
+
+``NVME_LOG_ANA_LSP_RGO_NAMESPACES``
+  *undescribed*
+
+``NVME_LOG_ANA_LSP_RGO_GROUPS_ONLY``
+  *undescribed*
+
+
 .. c:function:: int nvme_get_log_ana (int fd, enum nvme_log_ana_lsp lsp, bool rae, __u64 offset, __u32 len, void * log)
 
 
@@ -1988,8 +2086,8 @@ See :c:type:`struct nvme_ana_rsp_hdr <nvme_ana_rsp_hdr>` for the defintion of th
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_ana_groups (int fd, bool rae, __u32 len, struct nvme_ana_group_desc * log)
@@ -2083,8 +2181,8 @@ records.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_log_reservation (int fd, bool rae, struct nvme_resv_notification_log * log)
@@ -2123,8 +2221,8 @@ estimates and information about the most recent sanitize operation.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features (int fd, __u8 fid, __u32 nsid, __u32 cdw11, __u32 cdw12, bool save, __u8 uuidx, __u32 cdw15, __u32 data_len, void * data, __u32 * result)
@@ -2168,8 +2266,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_arbitration (int fd, __u8 ab, __u8 lpw, __u8 mpw, __u8 hpw, bool save, __u32 * result)
@@ -2200,8 +2298,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_power_mgmt (int fd, __u8 ps, __u8 wh, bool save, __u32 * result)
@@ -2226,8 +2324,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_lba_range (int fd, __u32 nsid, __u32 nr_ranges, bool save, struct nvme_lba_range_type * data, __u32 * result)
@@ -2255,8 +2353,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -2298,8 +2396,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_err_recovery (int fd, __u32 nsid, __u16 tler, bool dulbe, bool save, __u32 * result)
@@ -2327,8 +2425,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_volatile_wc (int fd, bool wce, bool save, __u32 * result)
@@ -2350,8 +2448,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_irq_coalesce (int fd, __u8 thr, __u8 time, bool save, __u32 * result)
@@ -2376,8 +2474,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_irq_config (int fd, __u16 iv, bool cd, bool save, __u32 * result)
@@ -2402,8 +2500,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_write_atomic (int fd, bool dn, bool save, __u32 * result)
@@ -2425,8 +2523,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -2498,8 +2596,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_auto_pst (int fd, bool apste, bool save, struct nvme_feat_auto_pst * apst, __u32 * result)
@@ -2524,8 +2622,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_timestamp (int fd, bool save, __u64 timestamp)
@@ -2544,8 +2642,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_hctm (int fd, __u16 tmt2, __u16 tmt1, bool save, __u32 * result)
@@ -2570,8 +2668,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_nopsc (int fd, bool noppme, bool save, __u32 * result)
@@ -2614,8 +2712,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_plm_config (int fd, bool enable, __u16 nvmsetid, bool save, struct nvme_plm_config * data, __u32 * result)
@@ -2643,8 +2741,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -2683,8 +2781,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_lba_sts_interval (int fd, __u16 lsiri, __u16 lsipi, bool save, __u32 * result)
@@ -2709,8 +2807,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_host_behavior (int fd, bool save, struct nvme_feat_host_behavior * data)
@@ -2729,8 +2827,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_sanitize (int fd, bool nodrm, bool save, __u32 * result)
@@ -2752,8 +2850,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_endurance_evt_cfg (int fd, __u16 endgid, __u8 egwarn, bool save, __u32 * result)
@@ -2778,8 +2876,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_sw_progress (int fd, __u8 pbslc, bool save, __u32 * result)
@@ -2801,8 +2899,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_host_id (int fd, bool exhid, bool save, __u8 * hostid)
@@ -2824,8 +2922,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_resv_mask (int fd, __u32 mask, bool save, __u32 * result)
@@ -2847,8 +2945,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_set_features_resv_persist (int fd, bool ptpl, bool save, __u32 * result)
@@ -2870,8 +2968,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -2913,8 +3011,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features (int fd, enum nvme_features_id fid, __u32 nsid, enum nvme_get_features_sel sel, __u32 cdw11, __u8 uuidx, __u32 data_len, void * data, __u32 * result)
@@ -2927,7 +3025,7 @@ The nvme command status if a response was received (see :c:type:`enum
   File descriptor of nvme device
 
 ``enum nvme_features_id fid``
-  Feature identifier
+  Feature identifier, see :c:type:`enum nvme_features_id <nvme_features_id>`
 
 ``__u32 nsid``
   Namespace ID, if applicable
@@ -2952,8 +3050,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_arbitration (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -2972,8 +3070,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_power_mgmt (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -2992,8 +3090,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_lba_range (int fd, enum nvme_get_features_sel sel, struct nvme_lba_range_type * data, __u32 * result)
@@ -3015,8 +3113,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_temp_thresh (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3035,8 +3133,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_err_recovery (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3055,8 +3153,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_volatile_wc (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3075,8 +3173,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_num_queues (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3095,8 +3193,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_irq_coalesce (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3115,8 +3213,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_irq_config (int fd, enum nvme_get_features_sel sel, __u16 iv, __u32 * result)
@@ -3138,8 +3236,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_write_atomic (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3158,8 +3256,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_async_event (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3178,8 +3276,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_auto_pst (int fd, enum nvme_get_features_sel sel, struct nvme_feat_auto_pst * apst, __u32 * result)
@@ -3201,8 +3299,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_host_mem_buf (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3221,8 +3319,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_timestamp (int fd, enum nvme_get_features_sel sel, struct nvme_timestamp * ts)
@@ -3241,8 +3339,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_kato (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3261,8 +3359,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_hctm (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3281,8 +3379,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_nopsc (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3301,8 +3399,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_rrl (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3321,8 +3419,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_plm_config (int fd, enum nvme_get_features_sel sel, __u16 nvmsetid, struct nvme_plm_config * data, __u32 * result)
@@ -3347,8 +3445,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_plm_window (int fd, enum nvme_get_features_sel sel, __u16 nvmsetid, __u32 * result)
@@ -3370,8 +3468,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_lba_sts_interval (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3390,8 +3488,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_host_behavior (int fd, enum nvme_get_features_sel sel, struct nvme_feat_host_behavior * data, __u32 * result)
@@ -3413,8 +3511,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_sanitize (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3433,8 +3531,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_endurance_event_cfg (int fd, enum nvme_get_features_sel sel, __u16 endgid, __u32 * result)
@@ -3456,8 +3554,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_sw_progress (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3476,8 +3574,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_host_id (int fd, enum nvme_get_features_sel sel, bool exhid, __u32 len, __u8 * hostid)
@@ -3502,8 +3600,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_resv_mask (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3522,8 +3620,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_resv_persist (int fd, enum nvme_get_features_sel sel, __u32 * result)
@@ -3542,8 +3640,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_features_write_protect (int fd, __u32 nsid, enum nvme_get_features_sel sel, __u32 * result)
@@ -3565,8 +3663,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_format_nvm (int fd, __u32 nsid, __u8 lbaf, enum nvme_cmd_format_mset mset, enum nvme_cmd_format_pi pi, enum nvme_cmd_format_pil pil, enum nvme_cmd_format_ses ses, __u32 timeout)
@@ -3609,8 +3707,8 @@ all namespaces or only the specific namespace associated with the command
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_ns_mgmt (int fd, __u32 nsid, enum nvme_ns_mgmt_sel sel, struct nvme_id_ns * ns, __u32 * result, __u32 timeout)
@@ -3663,8 +3761,8 @@ namespace to one or more controllers.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_ns_mgmt_delete (int fd, __u32 nsid)
@@ -3686,8 +3784,8 @@ attached.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_ns_attach (int fd, __u32 nsid, enum nvme_ns_attach_sel sel, struct nvme_ctrl_list * ctrlist)
@@ -3774,8 +3872,8 @@ image.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_fw_commit (int fd, __u8 slot, enum nvme_fw_commit_ca action, bool bpid)
@@ -3803,8 +3901,9 @@ Partitions.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. The command status
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise. The command
+        status
         response may specify additional
         reset actions required to complete the commit process.
 
@@ -3857,8 +3956,8 @@ specification.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_security_receive (int fd, __u32 nsid, __u8 nssf, __u8 spsp0, __u8 spsp1, __u8 secp, __u32 al, __u32 data_len, void * data, __u32 * result)
@@ -3898,8 +3997,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_lba_status (int fd, __u32 nsid, __u64 slba, __u32 mndw, __u16 rl, enum nvme_lba_status_atype atype, struct nvme_lba_status * lbas)
@@ -3937,8 +4036,8 @@ Unrecoverable LBAs. Refer to the specification for action type descriptions.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_send (int fd, __u32 nsid, __u16 dspec, enum nvme_directive_send_doper doper, enum nvme_directive_dtype dtype, __u32 cdw12, __u32 data_len, void * data, __u32 * result)
@@ -3984,8 +4083,8 @@ See the NVMe specification for more information.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_send_id_endir (int fd, __u32 nsid, bool endir, enum nvme_directive_dtype dtype, struct nvme_id_directives * id)
@@ -4010,8 +4109,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_send_stream_release_identifier (int fd, __u32 nsid, __u16 stream_id)
@@ -4030,8 +4129,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_send_stream_release_resource (int fd, __u32 nsid)
@@ -4047,8 +4146,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_recv (int fd, __u32 nsid, __u16 dspec, enum nvme_directive_receive_doper doper, enum nvme_directive_dtype dtype, __u32 cdw12, __u32 data_len, void * data, __u32 * result)
@@ -4086,8 +4185,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_recv_identify_parameters (int fd, __u32 nsid, struct nvme_id_directives * id)
@@ -4106,8 +4205,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_recv_stream_parameters (int fd, __u32 nsid, struct nvme_streams_directive_params * parms)
@@ -4126,8 +4225,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_recv_stream_status (int fd, __u32 nsid, unsigned nr_entries, struct nvme_streams_directive_status * id)
@@ -4149,8 +4248,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_directive_recv_stream_allocate (int fd, __u32 nsid, __u16 nsr, __u32 * result)
@@ -4172,8 +4271,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -4224,8 +4323,8 @@ properties align to the PCI MMIO controller registers.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_get_property (int fd, int offset, __u64 * value)
@@ -4250,8 +4349,8 @@ properties align to the PCI MMIO controller registers.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_sanitize_nvm (int fd, enum nvme_sanitize_sanact sanact, bool ause, __u8 owpass, bool oipbp, bool nodas, __u32 ovrpat)
@@ -4295,8 +4394,8 @@ sanitize command does not indicate completion of the sanitize operation.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_dev_self_test (int fd, __u32 nsid, enum nvme_dst_stc stc)
@@ -4329,8 +4428,8 @@ namespace, if present.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_virtual_mgmt (int fd, enum nvme_virt_mgmt_act act, enum nvme_virt_mgmt_rt rt, __u16 cntlid, __u16 nr, __u32 * result)
@@ -4369,8 +4468,8 @@ used for several functions:
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -4436,8 +4535,8 @@ cache be made non-volatile.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -4579,8 +4678,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_write (int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control, __u8 dsm, __u16 dspec, __u32 reftag, __u16 apptag, __u16 appmask, __u32 data_len, void * data, __u32 metadata_len, void * metadata)
@@ -4640,8 +4739,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_compare (int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control, __u32 reftag, __u16 apptag, __u16 appmask, __u32 data_len, void * data, __u32 metadata_len, void * metadata)
@@ -4695,8 +4794,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_write_zeros (int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control, __u32 reftag, __u16 apptag, __u16 appmask)
@@ -4744,8 +4843,8 @@ to 0h until a write occurs to this LBA range.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_write_uncorrectable (int fd, __u32 nsid, __u64 slba, __u16 nlb)
@@ -4776,8 +4875,8 @@ required.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_verify (int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control, __u32 reftag, __u16 apptag, __u16 appmask)
@@ -4824,8 +4923,8 @@ data or metadata to the host.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -4877,8 +4976,8 @@ deallocate/unmap/trim those logical blocks.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -4960,8 +5059,8 @@ reservation held on a namespace.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -5033,8 +5132,8 @@ a reservation key.
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 
@@ -5077,8 +5176,8 @@ The nvme command status if a response was received (see :c:type:`enum
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
 .. c:function:: int nvme_resv_report (int fd, __u32 nsid, bool eds, __u32 len, struct nvme_reservation_status * report)
@@ -5110,414 +5209,214 @@ the returned structure, :c:type:`struct nvme_reservation_status <nvme_reservatio
 
 **Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
-.. c:function:: int nvme_namespace_filter (const struct dirent * d)
+.. c:function:: nvme_subsystem_t nvme_first_subsystem (nvme_root_t r)
 
 
 **Parameters**
 
-``const struct dirent * d``
+``nvme_root_t r``
 
 
-.. c:function:: int nvme_paths_filter (const struct dirent * d)
+.. c:function:: nvme_subsystem_t nvme_next_subsystem (nvme_root_t r, nvme_subsystem_t s)
 
 
 **Parameters**
 
-``const struct dirent * d``
+``nvme_root_t r``
+  *undescribed*
+
+``nvme_subsystem_t s``
 
 
-.. c:function:: int nvme_ctrls_filter (const struct dirent * d)
+.. c:function:: nvme_ns_t nvme_ctrl_first_ns (nvme_ctrl_t c)
 
 
 **Parameters**
 
-``const struct dirent * d``
+``nvme_ctrl_t c``
 
 
-.. c:function:: int nvme_subsys_filter (const struct dirent * d)
+.. c:function:: nvme_ns_t nvme_ctrl_next_ns (nvme_ctrl_t c, nvme_ns_t n)
 
 
 **Parameters**
 
-``const struct dirent * d``
+``nvme_ctrl_t c``
+  *undescribed*
 
+``nvme_ns_t n``
 
-.. c:function:: int nvme_scan_subsystems (struct dirent *** subsys)
+
+.. c:function:: nvme_path_t nvme_ctrl_first_path (nvme_ctrl_t c)
 
 
 **Parameters**
 
-``struct dirent *** subsys``
+``nvme_ctrl_t c``
 
 
-.. c:function:: int nvme_scan_subsystem_ctrls (nvme_subsystem_t s, struct dirent *** ctrls)
+.. c:function:: nvme_path_t nvme_ctrl_next_path (nvme_ctrl_t c, nvme_path_t p)
 
 
 **Parameters**
 
-``nvme_subsystem_t s``
+``nvme_ctrl_t c``
   *undescribed*
 
-``struct dirent *** ctrls``
+``nvme_path_t p``
 
 
-.. c:function:: int nvme_scan_subsystem_namespaces (nvme_subsystem_t s, struct dirent *** namespaces)
+.. c:function:: nvme_ctrl_t nvme_subsystem_first_ctrl (nvme_subsystem_t s)
 
 
 **Parameters**
 
 ``nvme_subsystem_t s``
-  *undescribed*
-
-``struct dirent *** namespaces``
 
 
-.. c:function:: int nvme_scan_ctrl_namespace_paths (nvme_ctrl_t c, struct dirent *** namespaces)
+.. c:function:: nvme_ctrl_t nvme_subsystem_next_ctrl (nvme_subsystem_t s, nvme_ctrl_t c)
 
 
 **Parameters**
 
-``nvme_ctrl_t c``
+``nvme_subsystem_t s``
   *undescribed*
 
-``struct dirent *** namespaces``
+``nvme_ctrl_t c``
 
 
-.. c:function:: int nvme_scan_ctrl_namespaces (nvme_ctrl_t c, struct dirent *** namespaces)
+.. c:function:: nvme_ns_t nvme_subsystem_first_ns (nvme_subsystem_t s)
 
 
 **Parameters**
 
-``nvme_ctrl_t c``
-  *undescribed*
-
-``struct dirent *** namespaces``
-
-
+``nvme_subsystem_t s``
 
 
-.. c:type:: struct nvme_fabrics_config
+.. c:function:: nvme_ns_t nvme_subsystem_next_ns (nvme_subsystem_t s, nvme_ns_t n)
 
 
-**Definition**
+**Parameters**
 
-::
+``nvme_subsystem_t s``
+  *undescribed*
 
-  struct nvme_fabrics_config {
-    const char *transport;
-    const char *traddr;
-    const char *trsvcid;
-    const char *nqn;
-    const char *hostnqn;
-    const char *host_traddr;
-    const char *hostid;
-    int queue_size;
-    int nr_io_queues;
-    int reconnect_delay;
-    int ctrl_loss_tmo;
-    int keep_alive_tmo;
-    int nr_write_queues;
-    int nr_poll_queues;
-    int tos;
-    bool duplicate_connect;
-    bool disable_sqflow;
-    bool hdr_digest;
-    bool data_digest;
-    uint8_t rsvd[0x200];
-  };
+``nvme_ns_t n``
 
-**Members**
 
+.. c:function:: nvme_for_each_subsystem_safe ( r,  s,  _s)
 
 
-.. c:function:: int nvmf_add_ctrl_opts (struct nvme_fabrics_config * cfg)
+**Parameters**
 
+``r``
+  *undescribed*
 
-**Parameters**
+``s``
+  *undescribed*
 
-``struct nvme_fabrics_config * cfg``
+``_s``
+  *undescribed*
 
 
-.. c:function:: nvme_ctrl_t nvmf_add_ctrl (struct nvme_fabrics_config * cfg)
+.. c:function:: nvme_for_each_subsystem ( r,  s)
 
 
 **Parameters**
 
-``struct nvme_fabrics_config * cfg``
+``r``
+  *undescribed*
+
+``s``
+  *undescribed*
 
 
-.. c:function:: int nvmf_get_discovery_log (nvme_ctrl_t c, struct nvmf_discovery_log ** logp, int max_retries)
+.. c:function:: nvme_subsystem_for_each_ctrl_safe ( s,  c,  _c)
 
 
 **Parameters**
 
-``nvme_ctrl_t c``
+``s``
   *undescribed*
 
-``struct nvmf_discovery_log ** logp``
+``c``
   *undescribed*
 
-``int max_retries``
+``_c``
+  *undescribed*
 
 
-.. c:function:: char * nvmf_hostnqn_generate ()
+.. c:function:: nvme_subsystem_for_each_ctrl ( s,  c)
 
-   Generate a machine specific host nqn
 
 **Parameters**
 
-**Return**
+``s``
+  *undescribed*
 
-An nvm namespace qualifieid name string based on the machine
-         identifier, or NULL if not successful.
+``c``
+  *undescribed*
 
 
-.. c:function:: char * nvmf_hostnqn_from_file ()
+.. c:function:: nvme_ctrl_for_each_ns_safe ( c,  n,  _n)
 
-   Reads the host nvm qualified name from the config default location in /etc/nvme/
 
 **Parameters**
 
-**Return**
+``c``
+  *undescribed*
 
-The host nqn, or NULL if unsuccessful. If found, the caller
-        is responsible to free the string.
+``n``
+  *undescribed*
 
+``_n``
+  *undescribed*
 
-.. c:function:: char * nvmf_hostid_from_file ()
 
-   Reads the host identifier from the config default location in /etc/nvme/.
+.. c:function:: nvme_ctrl_for_each_ns ( c,  n)
+
 
 **Parameters**
 
-**Return**
+``c``
+  *undescribed*
 
-The host identifier, or NULL if unsuccessful. If found, the caller
-        is responsible to free the string.
+``n``
+  *undescribed*
 
 
-.. c:function:: nvme_ctrl_t nvmf_connect_disc_entry (struct nvmf_disc_log_entry * e, const struct nvme_fabrics_config * defcfg, bool * discover)
+.. c:function:: nvme_ctrl_for_each_path_safe ( c,  p,  _p)
 
 
 **Parameters**
 
-``struct nvmf_disc_log_entry * e``
+``c``
   *undescribed*
 
-``const struct nvme_fabrics_config * defcfg``
+``p``
   *undescribed*
 
-``bool * discover``
+``_p``
+  *undescribed*
 
 
-.. c:function:: nvme_subsystem_t nvme_first_subsystem (nvme_root_t r)
+.. c:function:: nvme_ctrl_for_each_path ( c,  p)
 
 
 **Parameters**
 
-``nvme_root_t r``
+``c``
+  *undescribed*
 
+``p``
+  *undescribed*
 
-.. c:function:: nvme_subsystem_t nvme_next_subsystem (nvme_root_t r, nvme_subsystem_t s)
 
-
-**Parameters**
-
-``nvme_root_t r``
-  *undescribed*
-
-``nvme_subsystem_t s``
-
-
-.. c:function:: nvme_ns_t nvme_ctrl_first_ns (nvme_ctrl_t c)
-
-
-**Parameters**
-
-``nvme_ctrl_t c``
-
-
-.. c:function:: nvme_ns_t nvme_ctrl_next_ns (nvme_ctrl_t c, nvme_ns_t n)
-
-
-**Parameters**
-
-``nvme_ctrl_t c``
-  *undescribed*
-
-``nvme_ns_t n``
-
-
-.. c:function:: nvme_path_t nvme_ctrl_first_path (nvme_ctrl_t c)
-
-
-**Parameters**
-
-``nvme_ctrl_t c``
-
-
-.. c:function:: nvme_path_t nvme_ctrl_next_path (nvme_ctrl_t c, nvme_path_t p)
-
-
-**Parameters**
-
-``nvme_ctrl_t c``
-  *undescribed*
-
-``nvme_path_t p``
-
-
-.. c:function:: nvme_ctrl_t nvme_subsystem_first_ctrl (nvme_subsystem_t s)
-
-
-**Parameters**
-
-``nvme_subsystem_t s``
-
-
-.. c:function:: nvme_ctrl_t nvme_subsystem_next_ctrl (nvme_subsystem_t s, nvme_ctrl_t c)
-
-
-**Parameters**
-
-``nvme_subsystem_t s``
-  *undescribed*
-
-``nvme_ctrl_t c``
-
-
-.. c:function:: nvme_ns_t nvme_subsystem_first_ns (nvme_subsystem_t s)
-
-
-**Parameters**
-
-``nvme_subsystem_t s``
-
-
-.. c:function:: nvme_ns_t nvme_subsystem_next_ns (nvme_subsystem_t s, nvme_ns_t n)
-
-
-**Parameters**
-
-``nvme_subsystem_t s``
-  *undescribed*
-
-``nvme_ns_t n``
-
-
-.. c:function:: nvme_for_each_subsystem_safe ( r,  s,  _s)
-
-
-**Parameters**
-
-``r``
-  *undescribed*
-
-``s``
-  *undescribed*
-
-``_s``
-  *undescribed*
-
-
-.. c:function:: nvme_for_each_subsystem ( r,  s)
-
-
-**Parameters**
-
-``r``
-  *undescribed*
-
-``s``
-  *undescribed*
-
-
-.. c:function:: nvme_subsystem_for_each_ctrl_safe ( s,  c,  _c)
-
-
-**Parameters**
-
-``s``
-  *undescribed*
-
-``c``
-  *undescribed*
-
-``_c``
-  *undescribed*
-
-
-.. c:function:: nvme_subsystem_for_each_ctrl ( s,  c)
-
-
-**Parameters**
-
-``s``
-  *undescribed*
-
-``c``
-  *undescribed*
-
-
-.. c:function:: nvme_ctrl_for_each_ns_safe ( c,  n,  _n)
-
-
-**Parameters**
-
-``c``
-  *undescribed*
-
-``n``
-  *undescribed*
-
-``_n``
-  *undescribed*
-
-
-.. c:function:: nvme_ctrl_for_each_ns ( c,  n)
-
-
-**Parameters**
-
-``c``
-  *undescribed*
-
-``n``
-  *undescribed*
-
-
-.. c:function:: nvme_ctrl_for_each_path_safe ( c,  p,  _p)
-
-
-**Parameters**
-
-``c``
-  *undescribed*
-
-``p``
-  *undescribed*
-
-``_p``
-  *undescribed*
-
-
-.. c:function:: nvme_ctrl_for_each_path ( c,  p)
-
-
-**Parameters**
-
-``c``
-  *undescribed*
-
-``p``
-  *undescribed*
-
-
-.. c:function:: nvme_subsystem_for_each_ns_safe ( s,  n,  _n)
+.. c:function:: nvme_subsystem_for_each_ns_safe ( s,  n,  _n)
 
 
 **Parameters**
@@ -6042,2598 +5941,2648 @@ The host identifier, or NULL if unsuccessful. If found, the caller
 ``const char * attr``
 
 
-.. c:function:: __u8 nvme_status_to_errno (int status, bool fabrics)
+.. c:function:: __le16 cpu_to_le16 (uint16_t x)
 
-   Converts nvme return status to errno
 
 **Parameters**
 
-``int status``
-  Return status from an nvme passthrough commmand
+``uint16_t x``
+  16-bit CPU value to turn to little endian.
 
-``bool fabrics``
-  Set to true if :c:type:`status` is to a fabrics target.
 
-**Return**
+.. c:function:: __le32 cpu_to_le32 (uint32_t x)
 
-An errno representing the nvme status if it is an nvme status field,
-        or unchanged status is < 0 since errno is already set.
 
+**Parameters**
 
-.. c:function:: int nvme_fw_download_seq (int fd, __u32 size, __u32 xfer, __u32 offset, void * buf)
+``uint32_t x``
+  32-bit CPU value to turn little endian.
 
 
-**Parameters**
+.. c:function:: __le64 cpu_to_le64 (uint64_t x)
 
-``int fd``
-  File descriptor of nvme device
 
-``__u32 size``
-  Total size of the firmware image to transfer
+**Parameters**
 
-``__u32 xfer``
-  Maximum size to send with each partial transfer
+``uint64_t x``
+  64-bit CPU value to turn little endian.
 
-``__u32 offset``
-  Starting offset to send with this firmware downlaod
 
-``void * buf``
-  Address of buffer containing all or part of the firmware image.
+.. c:function:: uint16_t le16_to_cpu (__le16 x)
 
-**Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+**Parameters**
+
+``__le16 x``
+  16-bit little endian value to turn to CPU.
 
 
-.. c:function:: int nvme_get_ctrl_telemetry (int fd, bool rae, struct nvme_telemetry_log ** log)
+.. c:function:: uint32_t le32_to_cpu (__le32 x)
 
 
 **Parameters**
 
-``int fd``
-  File descriptor of nvme device
+``__le32 x``
+  32-bit little endian value to turn to CPU.
 
-``bool rae``
-  Retain asynchronous events
 
-``struct nvme_telemetry_log ** log``
-  On success, set to the value of the allocated and retreived log.
+.. c:function:: uint64_t le64_to_cpu (__le64 x)
 
-**Description**
 
-The total size allocated can be calculated as:
-  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
+**Parameters**
 
-**Return**
+``__le64 x``
+  64-bit little endian value to turn to CPU.
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
-.. c:function:: int nvme_get_host_telemetry (int fd, struct nvme_telemetry_log ** log)
 
+.. c:type:: enum nvme_constants
 
-**Parameters**
+   A place to stash various constant nvme values
 
-``int fd``
-  File descriptor of nvme device
+**Constants**
 
-``struct nvme_telemetry_log ** log``
-  On success, set to the value of the allocated and retreived log.
-
-**Description**
+``NVME_NSID_ALL``
+  A broadcast value that is used to specify all
+  namespaces
 
-The total size allocated can be calculated as:
-  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
+``NVME_NSID_NONE``
+  The invalid namespace id, for when the nsid
+  parameter is not used in a command
 
-**Return**
+``NVME_UUID_NONE``
+  Use to omit the uuid command parameter
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+``NVME_CNTLID_NONE``
+  Use to omit the cntlid command parameter
 
+``NVME_NVMSETID_NONE``
+  Use to omit the nvmsetid command parameter
 
-.. c:function:: int nvme_get_new_host_telemetry (int fd, struct nvme_telemetry_log ** log)
+``NVME_LOG_LSP_NONE``
+  Use to omit the log lsp command parameter
 
+``NVME_LOG_LSI_NONE``
+  Use to omit the log lsi command parameter
 
-**Parameters**
+``NVME_IDENTIFY_DATA_SIZE``
+  The transfer size for nvme identify commands
 
-``int fd``
-  File descriptor of nvme device
+``NVME_ID_NVMSET_LIST_MAX``
+  The largest possible nvmset index in identify
+  nvmeset
 
-``struct nvme_telemetry_log ** log``
-  On success, set to the value of the allocated and retreived log.
+``NVME_ID_UUID_LIST_MAX``
+  The largest possible uuid index in identify
+  uuid list
 
-**Description**
+``NVME_ID_CTRL_LIST_MAX``
+  The largest possible controller index in
+  identify controller list
 
-The total size allocated can be calculated as:
-  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
+``NVME_ID_NS_LIST_MAX``
+  The largest possible namespace index in
+  identify namespace list
 
-**Return**
+``NVME_ID_SECONDARY_CTRL_MAX``
+  The largest possible secondary controller index
+  in identify secondary controller
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+``NVME_ID_ND_DESCRIPTOR_MAX``
+  *undescribed*
 
+``NVME_FEAT_LBA_RANGE_MAX``
+  The largest possible LBA range index in feature
+  lba range type
 
-.. c:function:: void nvme_init_id_ns (struct nvme_id_ns * ns, __u64 nsze, __u64 ncap, __u8 flbas, __u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid)
+``NVME_LOG_ST_MAX_RESULTS``
+  The largest possible self test result index in the
+  device self test log
 
-   Initialize an Identify Namepsace structure for creation.
+``NVME_LOG_TELEM_BLOCK_SIZE``
+  Specification defined size of Telemetry Data Blocks
 
-**Parameters**
+``NVME_DSM_MAX_RANGES``
+  The largest possible range index in a data-set
+  management command
 
-``struct nvme_id_ns * ns``
-  Address of the Identify Namespace structure to initialize
+``NVME_NQN_LENGTH``
+  Max length for NVMe Qualified Name.
 
-``__u64 nsze``
-  Namespace size
+``NVMF_TRADDR_SIZE``
+  *undescribed*
 
-``__u64 ncap``
-  namespace capacity
+``NVMF_TSAS_SIZE``
+  *undescribed*
 
-``__u8 flbas``
-  formatted logical block size settings
+``NVME_NIDT_EUI64_LEN``
+  *undescribed*
 
-``__u8 dps``
-  Data protection settings
+``NVME_NIDT_NGUID_LEN``
+  *undescribed*
 
-``__u8 nmic``
-  Namespace sharing capabilities
 
-``__u32 anagrpid``
-  ANA group identifier
 
-``__u16 nvmsetid``
-  NVM Set identifer
 
-**Description**
+.. c:type:: enum nvme_register_offsets
 
-This is intended to be used with a namespace management "create", see
-:c:type:`nvme_ns_mgmt_create`().
+   The nvme controller registers for all transports. This is the layout of BAR0/1 for PCIe, and properties for fabrics.
 
+**Constants**
 
-.. c:function:: void nvme_init_ctrl_list (struct nvme_ctrl_list * cntlist, __u16 num_ctrls, __u16 * ctrlist)
+``NVME_REG_CAP``
+  Controller Capabilities
 
-   Initialize an nvme_ctrl_list structure from an array.
+``NVME_REG_VS``
+  Version
 
-**Parameters**
+``NVME_REG_INTMS``
+  Interrupt Mask Set
 
-``struct nvme_ctrl_list * cntlist``
-  The controller list structure to initialize
+``NVME_REG_INTMC``
+  Interrupt Mask Clear
 
-``__u16 num_ctrls``
-  The number of controllers in the array, :c:type:`ctrlist`.
+``NVME_REG_CC``
+  Controller Configuration
 
-``__u16 * ctrlist``
-  An array of controller identifiers in CPU native endian.
+``NVME_REG_CSTS``
+  Controller Status
 
-**Description**
+``NVME_REG_NSSR``
+  NVM Subsystem Reset
 
-This is intended to be used with any command that takes a controller list
-argument. See :c:type:`nvme_ns_attach_ctrls`() and :c:type:`nvme_ns_detach`().
+``NVME_REG_AQA``
+  Admin Queue Attributes
 
+``NVME_REG_ASQ``
+  Admin SQ Base Address
 
-.. c:function:: void nvme_init_dsm_range (struct nvme_dsm_range * dsm, __u32 * ctx_attrs, __u32 * llbas, __u64 * slbas, __u16 nr_ranges)
+``NVME_REG_ACQ``
+  Admin CQ Base Address
 
-   Constructs a data set range structure
+``NVME_REG_CMBLOC``
+  Controller Memory Buffer Location
 
-**Parameters**
+``NVME_REG_CMBSZ``
+  Controller Memory Buffer Size
 
-``struct nvme_dsm_range * dsm``
-  DSM range array
+``NVME_REG_BPINFO``
+  Boot Partition Information
 
-``__u32 * ctx_attrs``
-  Array of context attributes
+``NVME_REG_BPRSEL``
+  Boot Partition Read Select
 
-``__u32 * llbas``
-  Array of length in logical blocks
+``NVME_REG_BPMBL``
+  Boot Partition Memory Buffer Location
 
-``__u64 * slbas``
-  Array of starting logical blocks
+``NVME_REG_CMBMSC``
+  Controller Memory Buffer Memory Space Control
 
-``__u16 nr_ranges``
-  The size of the dsm arrays
+``NVME_REG_CMBSTS``
+  Controller Memory Buffer Status
 
-**Description**
+``NVME_REG_PMRCAP``
+  Persistent Memory Capabilities
 
-Each array must be the same size of size 'nr_ranges'. This is intended to be
-used with constructing a payload for :c:type:`nvme_dsm`().
+``NVME_REG_PMRCTL``
+  Persistent Memory Region Control
 
-**Return**
+``NVME_REG_PMRSTS``
+  Persistent Memory Region Status
 
-The nvme command status if a response was received or -errno
-        otherwise.
+``NVME_REG_PMREBS``
+  Persistent Memory Region Elasticity Buffer Size
 
+``NVME_REG_PMRSWTP``
+  Memory Region Sustained Write Throughput
 
-.. c:function:: int __nvme_get_log_page (int fd, __u32 nsid, __u8 log_id, bool rae, __u32 xfer_len, __u32 data_len, void * data)
+``NVME_REG_PMRMSC``
+  Persistent Memory Region Controller Memory Space Control
 
+``NVME_REG_DBS``
+  SQ 0 Tail Doorbell
 
-**Parameters**
 
-``int fd``
-  File descriptor of nvme device
+.. c:function:: bool nvme_is_64bit_reg (__u32 offset)
 
-``__u32 nsid``
-  Namespace Identifier, if applicable.
+   Checks if offset of the controller register is a know 64bit value.
 
-``__u8 log_id``
-  Log Identifier, see :c:type:`enum nvme_cmd_get_log_lid <nvme_cmd_get_log_lid>`.
+**Parameters**
 
-``bool rae``
-  Retain asynchronous events
+``__u32 offset``
+  Offset of controller register field in bytes
 
-``__u32 xfer_len``
-  Max log transfer size per request to split the total.
+**Description**
 
-``__u32 data_len``
-  Total length of the log to transfer.
+This function does not care about transport so that the offset is not going
+to be checked inside of this function for the unsupported fields in a
+specific transport. For example, BPMBL(Boot Partition Memory Buffer
+Location) register is not supported by fabrics, but it can be chcked here.
 
-``void * data``
-  User address of at least :c:type:`data_len` to store the log.
+Returns true if given offset is 64bit register, otherwise it returns false.
 
-**Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
-.. c:function:: int nvme_get_log_page (int fd, __u32 nsid, __u8 log_id, bool rae, __u32 data_len, void * data)
+.. c:type:: enum nvme_psd_flags
 
+   Possible flag values in nvme power state descriptor
 
-**Parameters**
+**Constants**
 
-``int fd``
-  File descriptor of nvme device
+``NVME_PSD_FLAGS_MXPS``
+  Indicates the scale for the Maximum Power
+  field. If this bit is cleared, then the scale of the
+  Maximum Power field is in 0.01 Watts. If this bit is
+  set, then the scale of the Maximum Power field is in
+  0.0001 Watts.
 
-``__u32 nsid``
-  Namespace Identifier, if applicable.
+``NVME_PSD_FLAGS_NOPS``
+  Indicates whether the controller processes I/O
+  commands in this power state. If this bit is cleared,
+  then the controller processes I/O commands in this
+  power state. If this bit is set, then the controller
+  does not process I/O commands in this power state.
 
-``__u8 log_id``
-  Log Identifier, see :c:type:`enum nvme_cmd_get_log_lid <nvme_cmd_get_log_lid>`.
 
-``bool rae``
-  Retain asynchronous events
 
-``__u32 data_len``
-  Total length of the log to transfer.
 
-``void * data``
-  User address of at least :c:type:`data_len` to store the log.
+.. c:type:: enum nvme_psd_ps
 
-**Description**
+   Known values for :c:type:`struct nvme_psd <nvme_psd>` ``ips`` and ``aps``. Use with nvme_psd_power_scale() to extract the power scale field to match this enum. NVME_PSD_IPS_100_MICRO_WATT: 0.0001 watt scale NVME_PSD_IPS_10_MILLI_WATT: 0.01 watt scale
 
-Calls __nvme_get_log_page() with a default 4k transfer length, as that is
-guarnateed by the protocol to be a safe transfer size.
+**Constants**
 
-**Return**
+``NVME_PSD_PS_100_MICRO_WATT``
+  *undescribed*
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+``NVME_PSD_PS_10_MILLI_WATT``
+  *undescribed*
 
 
-.. c:function:: int nvme_get_ana_log_len (int fd, size_t * analen)
+.. c:function:: unsigned nvme_psd_power_scale (__u8 ps)
 
-   Retreive size of the current ANA log
+   power scale occupies the upper 3 bits
 
 **Parameters**
 
-``int fd``
-  File descriptor of nvme device
+``__u8 ps``
+  *undescribed*
 
-``size_t * analen``
-  Pointer to where the length will be set on success
 
-**Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
+.. c:type:: enum nvme_psd_workload
 
-.. c:function:: int nvme_namespace_attach_ctrls (int fd, __u32 nsid, __u16 num_ctrls, __u16 * ctrlist)
+   Specifies a workload hint in the Power Management Feature (see :c:type:`struct nvme_psd <nvme_psd>`.apw) to inform the NVM subsystem or indicate the conditions for the active power level.
 
-   Attach namespace to controller(s)
+**Constants**
 
-**Parameters**
-
-``int fd``
-  File descriptor of nvme device
+``NVME_PSD_WORKLOAD_1``
+  Extended Idle Period with a Burst of Random Write
+  consists of five minutes of idle followed by
+  thirty-two random write commands of size 1 MiB
+  submitted to a single controller while all other
+  controllers in the NVM subsystem are idle, and then
+  thirty (30) seconds of idle.
 
-``__u32 nsid``
-  Namespace ID to attach
+``NVME_PSD_WORKLOAD_2``
+  Heavy Sequential Writes consists of 80,000
+  sequential write commands of size 128 KiB submitted to
+  a single controller while all other controllers in the
+  NVM subsystem are idle.  The submission queue(s)
+  should be sufficiently large allowing the host to
+  ensure there are multiple commands pending at all
+  times during the workload.
 
-``__u16 num_ctrls``
-  Number of controllers in ctrlist
 
-``__u16 * ctrlist``
-  List of controller IDs to perform the attach action
 
-**Return**
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+.. c:type:: struct nvme_id_psd
 
 
-.. c:function:: int nvme_namespace_detach_ctrls (int fd, __u32 nsid, __u16 num_ctrls, __u16 * ctrlist)
+**Definition**
 
-   Detach namespace from controller(s)
+::
 
-**Parameters**
+  struct nvme_id_psd {
+    __le16 mp;
+    __u8 rsvd2;
+    __u8 flags;
+    __le32 enlat;
+    __le32 exlat;
+    __u8 rrt;
+    __u8 rrl;
+    __u8 rwt;
+    __u8 rwl;
+    __le16 idlp;
+    __u8 ips;
+    __u8 rsvd19;
+    __le16 actp;
+    __u8 apw;
+    __u8 aps;
+    __u8 rsvd23[8];
+  };
 
-``int fd``
-  File descriptor of nvme device
+**Members**
 
-``__u32 nsid``
-  Namespace ID to detach
+``mp``
+  Maximum Power indicates the sustained maximum power consumed by the
+  NVM subsystem in this power state. The power in Watts is equal to
+  the value in this field multiplied by the scale specified in the Max
+  Power Scale bit (see :c:type:`enum nvme_psd_flags <nvme_psd_flags>`). A value of 0 indicates
+  Maximum Power is not reported.
 
-``__u16 num_ctrls``
-  Number of controllers in ctrlist
+``flags``
+  Additional decoding flags, see :c:type:`enum nvme_psd_flags <nvme_psd_flags>`.
 
-``__u16 * ctrlist``
-  List of controller IDs to perform the detach action
+``enlat``
+  Entry Latency indicates the maximum latency in microseconds
+  associated with entering this power state. A value of 0 indicates
+  Entry Latency is not reported.
 
-**Return**
+``exlat``
+  Exit Latency indicates the maximum latency in microseconds
+  associated with exiting this power state. A value of 0 indicates
+  Exit Latency is not reported.
 
-The nvme command status if a response was received (see :c:type:`enum
-        nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
+``rrt``
+  Relative Read Throughput indicates the read throughput rank
+  associated with this power state relative to others. The value in
+  this is less than the number of supported power states.
 
+``rrl``
+  Relative Reade Latency indicates the read latency rank associated
+  with this power state relative to others. The value in this field is
+  less than the number of supported power states.
 
-.. c:function:: int nvme_get_feature_length (int fid, __u32 cdw11, __u32 * len)
+``rwt``
+  Relative Write Throughput indicates write throughput rank associated
+  with this power state relative to others. The value in this field is
+  less than the number of supported power states
 
-   Retreive the command payload length for a specific feature identifier
+``rwl``
+  Relative Write Latency indicates the write latency rank associated
+  with this power state relative to others. The value in this field is
+  less than the number of supported power states
 
-**Parameters**
+``idlp``
+  Idle Power indicates the typical power consumed by the NVM
+  subsystem over 30 seconds in this power state when idle.
 
-``int fid``
-  Feature identifier, see :c:type:`enum nvme_features_id <nvme_features_id>`.
+``ips``
+  Idle Power Scale indicates the scale for :c:type:`struct nvme_id_psd <nvme_id_psd>`.idlp,
+  see :c:type:`enum nvme_psd_ps <nvme_psd_ps>` for decoding this field.
 
-``__u32 cdw11``
-  The cdw11 value may affect the transfer (only known fid is
-  ``NVME_FEAT_FID_HOST_ID``)
+``actp``
+  Active Power indicates the largest average power consumed by the
+  NVM subsystem over a 10 second period in this power state with
+  the workload indicated in the Active Power Workload field.
 
-``__u32 * len``
-  On success, set to this features payload length in bytes.
+``apw``
+  Active Power Workload indicates the workload used to calculate
+  maximum power for this power state. See :c:type:`enum nvme_psd_workload <nvme_psd_workload>` for
+  decoding this field.
 
-**Return**
+``aps``
+  Active Power Scale indicates the scale for the :c:type:`struct
+  nvme_id_psd <nvme_id_psd>`.actp, see :c:type:`enum nvme_psd_ps <nvme_psd_ps>` for decoding this value.
 
-0 on success, -1 with errno set to EINVAL if the function did not
-        recognize :c:type:`fid`.
 
 
-.. c:function:: int nvme_get_directive_receive_length (enum nvme_directive_dtype dtype, enum nvme_directive_receive_doper doper, __u32 * len)
 
 
-**Parameters**
+.. c:type:: struct nvme_id_ctrl
 
-``enum nvme_directive_dtype dtype``
-  Directive type, see :c:type:`enum nvme_directive_dtype <nvme_directive_dtype>`
+   Identify Controller data structure
 
-``enum nvme_directive_receive_doper doper``
-  Directive receive operation, see :c:type:`enum nvme_directive_receive_doper <nvme_directive_receive_doper>`
+**Definition**
 
-``__u32 * len``
-  On success, set to this directives payload length in bytes.
+::
 
-**Return**
+  struct nvme_id_ctrl {
+    __le16 vid;
+    __le16 ssvid;
+    char sn[20];
+    char mn[40];
+    char fr[8];
+    __u8 rab;
+    __u8 ieee[3];
+    __u8 cmic;
+    __u8 mdts;
+    __le16 cntlid;
+    __le32 ver;
+    __le32 rtd3r;
+    __le32 rtd3e;
+    __le32 oaes;
+    __le32 ctratt;
+    __le16 rrls;
+    __u8 rsvd102[9];
+    __u8 cntrltype;
+    __u8 fguid[16];
+    __le16 crdt1;
+    __le16 crdt2;
+    __le16 crdt3;
+    __u8 rsvd134[119];
+    __u8 nvmsr;
+    __u8 vwci;
+    __u8 mec;
+    __le16 oacs;
+    __u8 acl;
+    __u8 aerl;
+    __u8 frmw;
+    __u8 lpa;
+    __u8 elpe;
+    __u8 npss;
+    __u8 avscc;
+    __u8 apsta;
+    __le16 wctemp;
+    __le16 cctemp;
+    __le16 mtfa;
+    __le32 hmpre;
+    __le32 hmmin;
+    __u8 tnvmcap[16];
+    __u8 unvmcap[16];
+    __le32 rpmbs;
+    __le16 edstt;
+    __u8 dsto;
+    __u8 fwug;
+    __le16 kas;
+    __le16 hctma;
+    __le16 mntmt;
+    __le16 mxtmt;
+    __le32 sanicap;
+    __le32 hmminds;
+    __le16 hmmaxd;
+    __le16 nsetidmax;
+    __le16 endgidmax;
+    __u8 anatt;
+    __u8 anacap;
+    __le32 anagrpmax;
+    __le32 nanagrpid;
+    __le32 pels;
+    __u8 rsvd356[156];
+    __u8 sqes;
+    __u8 cqes;
+    __le16 maxcmd;
+    __le32 nn;
+    __le16 oncs;
+    __le16 fuses;
+    __u8 fna;
+    __u8 vwc;
+    __le16 awun;
+    __le16 awupf;
+    __u8 nvscc;
+    __u8 nwpc;
+    __le16 acwu;
+    __u8 rsvd534[2];
+    __le32 sgls;
+    __le32 mnan;
+    __u8 rsvd544[224];
+    char subnqn[NVME_NQN_LENGTH];
+    __u8 rsvd1024[768];
+    __le32 ioccsz;
+    __le32 iorcsz;
+    __le16 icdoff;
+    __u8 fcatt;
+    __u8 msdbd;
+    __le16 ofcs;
+    __u8 rsvd1806[242];
+    struct nvme_id_psd      psd[32];
+    __u8 vs[1024];
+  };
 
-0 on success, -1 with errno set to EINVAL if the function did not
-        recognize :c:type:`dtype` or :c:type:`doper`.
+**Members**
 
+``vid``
+  PCI Vendor ID, the company vendor identifier that is assigned by
+  the PCI SIG.
 
-.. c:function:: int nvme_open (const char * name)
+``ssvid``
+  PCI Subsystem Vendor ID, the company vendor identifier that is
+  assigned by the PCI SIG for the subsystem.
 
-   Open an nvme controller or namespace device
+``sn``
+  Serial Number in ascii
 
-**Parameters**
+``mn``
+  Model Number in ascii
 
-``const char * name``
-  The basename of the device to open
+``fr``
+  Firmware Revision in ascii, the currently active firmware
+  revision for the NVM subsystem
 
-**Description**
+``rab``
+  Recommended Arbitration Burst, reported as a power of two
 
-This will look for the handle in /dev/ and validate the name and filetype
-match linux conventions.
+``ieee``
+  IEEE assigned Organization Unique Identifier
 
-**Return**
+``cmic``
+  Controller Multipath IO and Namespace Sharing  Capabilities of
+  the controller and NVM subsystem. See :c:type:`enum nvme_id_ctrl_cmic <nvme_id_ctrl_cmic>`.
 
-A file descriptor for the device on a successful open, or -1 with
-        errno set otherwise.
+``mdts``
+  Max Data Transfer Size is the largest data transfer size. The
+  host should not submit a command that exceeds this maximum data
+  transfer size. The value is in units of the minimum memory page
+  size (CAP.MPSMIN) and is reported as a power of two
 
+``cntlid``
+  Controller ID, the NVM subsystem unique controller identifier
+  associated with the controller.
 
-.. c:function:: __le16 cpu_to_le16 (uint16_t x)
+``ver``
+  Version, this field contains the value reported in the Version
+  register, or property (see :c:type:`enum nvme_registers <nvme_registers>` ``NVME_REG_VS``).
 
+``rtd3r``
+  RTD3 Resume Latency, the expected latency in microseconds to resume
+  from Runtime D3
 
-**Parameters**
+``rtd3e``
+  RTD3 Exit Latency, the typical latency in microseconds to enter
+  Runtime D3.
 
-``uint16_t x``
-  16-bit CPU value to turn to little endian.
+``oaes``
+  Optional Async Events Supported, see **enum** nvme_id_ctrl_oaes .
 
+``ctratt``
+  Controller Attributes, see **enum** nvme_id_ctrl_ctratt
 
-.. c:function:: __le32 cpu_to_le32 (uint32_t x)
+``rrls``
+  Read Recovery Levels. If a bit is set, then the corresponding
+  Read Recovery Level is supported. If a bit is cleared, then the
+  corresponding Read Recovery Level is not supported.
 
+``cntrltype``
+  Controller Type, see :c:type:`enum nvme_id_ctrl_cntrltype <nvme_id_ctrl_cntrltype>`
 
-**Parameters**
+``fguid``
+  FRU GUID, a 128-bit value that is globally unique for a given
+  Field Replaceable Unit
 
-``uint32_t x``
-  32-bit CPU value to turn little endian.
+``crdt1``
+  Controller Retry Delay time in 100 millisecod units if CQE CRD
+  field is 1
 
+``crdt2``
+  Controller Retry Delay time in 100 millisecod units if CQE CRD
+  field is 2
 
-.. c:function:: __le64 cpu_to_le64 (uint64_t x)
+``crdt3``
+  Controller Retry Delay time in 100 millisecod units if CQE CRD
+  field is 3
 
+``nvmsr``
+  NVM Subsystem Report, see :c:type:`enum nvme_id_ctrl_nvmsr <nvme_id_ctrl_nvmsr>`
 
-**Parameters**
+``vwci``
+  VPD Write Cycle Information, see :c:type:`enum nvme_id_ctrl_vwci <nvme_id_ctrl_vwci>`
 
-``uint64_t x``
-  64-bit CPU value to turn little endian.
+``mec``
+  Management Endpoint Capabilities, see :c:type:`enum nvme_id_ctrl_mec <nvme_id_ctrl_mec>`
 
+``oacs``
+  Optional Admin Command Support,the optional Admin commands and
+  features supported by the controller, see :c:type:`enum nvme_id_ctrl_oacs <nvme_id_ctrl_oacs>`.
 
-.. c:function:: uint16_t le16_to_cpu (__le16 x)
+``acl``
+  Abort Command Limit, the maximum number of concurrently
+  executing Abort commands supported by the controller. This is a
+  0's based value.
 
+``aerl``
+  Async Event Request Limit, the maximum number of concurrently
+  outstanding Asynchronous Event Request commands supported by the
+  controller This is a 0's based value.
 
-**Parameters**
+``frmw``
+  Firmware Updates indicates capabilities regarding firmware
+  updates. See :c:type:`enum nvme_id_ctrl_frmw <nvme_id_ctrl_frmw>`.
 
-``__le16 x``
-  16-bit little endian value to turn to CPU.
+``lpa``
+  Log Page Attributes, see :c:type:`enum nvme_id_ctrl_lpa <nvme_id_ctrl_lpa>`.
 
+``elpe``
+  Error Log Page Entries, the maximum number of Error Information
+  log entries that are stored by the controller. This field is a
+  0's based value.
 
-.. c:function:: uint32_t le32_to_cpu (__le32 x)
+``npss``
+  Number of Power States Supported, the number of NVM Express
+  power states supported by the controller, indicating the number
+  of valid entries in :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.psd. This is a 0's
+  based value.
 
+``avscc``
+  Admin Vendor Specific Command Configuration, see
+  :c:type:`enum nvme_id_ctrl_avscc <nvme_id_ctrl_avscc>`.
 
-**Parameters**
+``apsta``
+  Autonomous Power State Transition Attributes, see
+  :c:type:`enum nvme_id_ctrl_apsta <nvme_id_ctrl_apsta>`.
 
-``__le32 x``
-  32-bit little endian value to turn to CPU.
+``wctemp``
+  Warning Composite Temperature Threshold indicates
+  the minimum Composite Temperature field value (see :c:type:`struct
+  nvme_smart_log <nvme_smart_log>`.critical_comp_time) that indicates an overheating
+  condition during which controller operation continues.
 
+``cctemp``
+  Critical Composite Temperature Threshold, field indicates the
+  minimum Composite Temperature field value (see :c:type:`struct
+   nvme_smart_log <nvme_smart_log>`.critical_comp_time) that indicates a critical
+  overheating condition.
 
-.. c:function:: uint64_t le64_to_cpu (__le64 x)
+``mtfa``
+  Maximum Time for Firmware Activation indicates the maximum time
+  the controller temporarily stops processing commands to activate
+  the firmware image, specified in 100 millisecond units. This
+  field is always valid if the controller supports firmware
+  activation without a reset.
 
+``hmpre``
+  Host Memory Buffer Preferred Size indicates the preferred size
+  that the host is requested to allocate for the Host Memory
+  Buffer feature in 4 KiB units.
 
-**Parameters**
+``hmmin``
+  Host Memory Buffer Minimum Size indicates the minimum size that
+  the host is requested to allocate for the Host Memory Buffer
+  feature in 4 KiB units.
 
-``__le64 x``
-  64-bit little endian value to turn to CPU.
+``tnvmcap``
+  Total NVM Capacity, the total NVM capacity in the NVM subsystem.
+  The value is in bytes.
 
+``unvmcap``
+  Unallocated NVM Capacity, the unallocated NVM capacity in the
+  NVM subsystem. The value is in bytes.
+  **rpmbs**      Replay Protected Memory Block Support, see
+  :c:type:`enum nvme_id_ctrl_rpmbs <nvme_id_ctrl_rpmbs>`.
+  **edstt**      Extended Device Self-test Time, if Device Self-test command is
+  supported (see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.oacs, ``NVME_CTRL_OACS_SELF_TEST``),
+  then this field indicates the nominal amount of time in one
+  minute units that the controller takes to complete an extended
+  device self-test operation when in power state 0.
 
+``dsto``
+  Device Self-test Options, see :c:type:`enum nvme_id_ctrl_dsto <nvme_id_ctrl_dsto>`.
 
+``fwug``
+  Firmware Update Granularity indicates the granularity and
+  alignment requirement of the firmware image being updated by the
+  Firmware Image Download command. The value is reported in 4 KiB
+  units. A value of 0h indicates no information on granularity is
+  provided. A value of FFh indicates no restriction
 
-.. c:type:: enum nvme_constants
+``kas``
+  Keep Alive Support indicates the granularity of the Keep Alive
+  Timer in 100 millisecond units.
 
-   A place to stash various constant nvme values
+``hctma``
+  Host Controlled Thermal Management Attributes, see :c:type:`enum nvme_id_ctrl_hctm <nvme_id_ctrl_hctm>`.
 
-**Constants**
+``mntmt``
+  Minimum Thermal Management Temperature indicates the minimum
+  temperature, in degrees Kelvin, that the host may request in the
+  Thermal Management Temperature 1 field and Thermal Management
+  Temperature 2 field of a Set Features command with the Feature
+  Identifier field set to ``NVME_FEAT_FID_HCTM``.
 
-``NVME_NSID_ALL``
-  A broadcast value that is used to specify all
-  namespaces
+``mxtmt``
+  Maximum Thermal Management Temperature indicates the maximum
+  temperature, in degrees Kelvin, that the host may request in the
+  Thermal Management Temperature 1 field and Thermal Management
+  Temperature 2 field of the Set Features command with the Feature
+  Identifier set to ``NVME_FEAT_FID_HCTM``.
 
-``NVME_NSID_NONE``
-  The invalid namespace id, for when the nsid
-  parameter is not used in a command
+``sanicap``
+  Sanitize Capabilities, see :c:type:`enum nvme_id_ctrl_sanicap <nvme_id_ctrl_sanicap>`
 
-``NVME_UUID_NONE``
-  Use to omit the uuid command parameter
+``hmminds``
+  Host Memory Buffer Minimum Descriptor Entry Size indicates the
+  minimum usable size of a Host Memory Buffer Descriptor Entry in
+  4 KiB units.
 
-``NVME_CNTLID_NONE``
-  Use to omit the cntlid command parameter
+``hmmaxd``
+  Host Memory Maximum Descriptors Entries indicates the number of
+  usable Host Memory Buffer Descriptor Entries.
 
-``NVME_NVMSETID_NONE``
-  Use to omit the nvmsetid command parameter
+``nsetidmax``
+  NVM Set Identifier Maximum, defines the maximum value of a valid
+  NVM Set Identifier for any controller in the NVM subsystem.
 
-``NVME_LOG_LSP_NONE``
-  Use to omit the log lsp command parameter
+``endgidmax``
+  Endurance Group Identifier Maximum, defines the maximum value of
+  a valid Endurance Group Identifier for any controller in the NVM
+  subsystem.
 
-``NVME_LOG_LSI_NONE``
-  Use to omit the log lsi command parameter
+``anatt``
+  ANA Transition Time indicates the maximum amount of time, in
+  seconds, for a transition between ANA states or the maximum
+  amount of time, in seconds, that the controller reports the ANA
+  change state.
 
-``NVME_IDENTIFY_DATA_SIZE``
-  The transfer size for nvme identify commands
+``anacap``
+  Asymmetric Namespace Access Capabilities, see
+  :c:type:`enum nvme_id_ctrl_anacap <nvme_id_ctrl_anacap>`.
 
-``NVME_ID_NVMSET_LIST_MAX``
-  The largest possible nvmset index in identify
-  nvmeset
+``anagrpmax``
+  ANA Group Identifier Maximum indicates the maximum value of a
+  valid ANA Group Identifier for any controller in the NVM
+  subsystem.
 
-``NVME_ID_UUID_LIST_MAX``
-  The largest possible uuid index in identify
-  uuid list
+``nanagrpid``
+  Number of ANA Group Identifiers indicates the number of ANA
+  groups supported by this controller.
 
-``NVME_ID_CTRL_LIST_MAX``
-  The largest possible controller index in
-  identify controller list
+``pels``
+  Persistent Event Log Size indicates the maximum reportable size
+  for the Persistent Event Log.
 
-``NVME_ID_NS_LIST_MAX``
-  The largest possible namespace index in
-  identify namespace list
+``sqes``
+  Submission Queue Entry Size, see :c:type:`enum nvme_id_ctrl_sqes <nvme_id_ctrl_sqes>`.
 
-``NVME_ID_SECONDARY_CTRL_MAX``
-  The largest possible secondary controller index
-  in identify secondary controller
+``cqes``
+  Completion Queue Entry Size, see :c:type:`enum nvme_id_ctrl_cqes <nvme_id_ctrl_cqes>`.
 
-``NVME_ID_ND_DESCRIPTOR_MAX``
-  *undescribed*
+``maxcmd``
+  Maximum Outstanding Commands indicates the maximum number of
+  commands that the controller processes at one time for a
+  particular queue.
 
-``NVME_FEAT_LBA_RANGE_MAX``
-  The largest possible LBA range index in feature
-  lba range type
+``nn``
+  Number of Namespaces indicates the maximum value of a valid
+  nsid for the NVM subsystem. If the MNAN (:c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.mnan
+  field is cleared to 0h, then this field also indicates the
+  maximum number of namespaces supported by the NVM.  subsystem.
 
-``NVME_LOG_ST_MAX_RESULTS``
-  The largest possible self test result index in the
-  device self test log
+``oncs``
+  Optional NVM Command Support, see :c:type:`enum nvme_id_ctrl_oncs <nvme_id_ctrl_oncs>`.
 
-``NVME_LOG_TELEM_BLOCK_SIZE``
-  Specification defined size of Telemetry Data Blocks
+``fuses``
+  Fused Operation Support, see :c:type:`enum nvme_id_ctrl_fuses <nvme_id_ctrl_fuses>`.
 
-``NVME_DSM_MAX_RANGES``
-  The largest possible range index in a data-set
-  management command
+``fna``
+  Format NVM Attributes, see :c:type:`enum nvme_id_ctrl_fna <nvme_id_ctrl_fna>`.
 
-``NVME_NQN_LENGTH``
-  Max length for NVMe Qualified Name.
-
-``NVMF_TRADDR_SIZE``
-  *undescribed*
+``vwc``
+  Volatile Write Cache, see :c:type:`enum nvme_id_ctrl_vwc <nvme_id_ctrl_vwc>`.
 
-``NVMF_TSAS_SIZE``
-  *undescribed*
+``awun``
+  Atomic Write Unit Normal indicates the size of the write
+  operation guaranteed to be written atomically to the NVM across
+  all namespaces with any supported namespace format during normal
+  operation. This field is specified in logical blocks and is a
+  0's based value.
 
+``awupf``
+  Atomic Write Unit Power Fail indicates the size of the write
+  operation guaranteed to be written atomically to the NVM across
+  all namespaces with any supported namespace format during a
+  power fail or error condition. This field is specified in
+  logical blocks and is a 0’s based value.
 
+``nvscc``
+  NVM Vendor Specific Command Configuration, see
+  :c:type:`enum nvme_id_ctrl_nvscc <nvme_id_ctrl_nvscc>`.
 
+``nwpc``
+  Namespace Write Protection Capabilities, see
+  :c:type:`enum nvme_id_ctrl_nwpc <nvme_id_ctrl_nwpc>`.
 
-.. c:type:: enum nvme_registers
+``acwu``
+  Atomic Compare & Write Unit indicates the size of the write
+  operation guaranteed to be written atomically to the NVM across
+  all namespaces with any supported namespace format for a Compare
+  and Write fused operation. This field is specified in logical
+  blocks and is a 0’s based value.
 
-   The nvme controller registers for all transports. This is the layout of BAR0/1 for PCIe, and properties for fabrics.
+``sgls``
+  SGL Support, see :c:type:`enum nvme_id_ctrl_sgls <nvme_id_ctrl_sgls>`
 
-**Constants**
+``mnan``
+  Maximum Number of Allowed Namespaces indicates the maximum
+  number of namespaces supported by the NVM subsystem.
 
-``NVME_REG_CAP``
-  Controller Capabilities
+``subnqn``
+  NVM Subsystem NVMe Qualified Name, UTF-8 null terminated string
 
-``NVME_REG_VS``
-  Version
+``ioccsz``
+  I/O Queue Command Capsule Supported Size, defines the maximum
+  I/O command capsule size in 16 byte units.
 
-``NVME_REG_INTMS``
-  Interrupt Mask Set
+``iorcsz``
+  I/O Queue Response Capsule Supported Size, defines the maximum
+  I/O response capsule size in 16 byte units.
 
-``NVME_REG_INTMC``
-  Interrupt Mask Clear
+``icdoff``
+  In Capsule Data Offset, defines the offset where data starts
+  within a capsule. This value is applicable to I/O Queues only.
 
-``NVME_REG_CC``
-  Controller Configuration
+``fcatt``
+  Fabrics Controller Attributes, see :c:type:`enum nvme_id_ctrl_fcatt <nvme_id_ctrl_fcatt>`.
 
-``NVME_REG_CSTS``
-  Controller Status
+``msdbd``
+  Maximum SGL Data Block Descriptors indicates the maximum
+  number of SGL Data Block or Keyed SGL Data Block descriptors
+  that a host is allowed to place in a capsule. A value of 0h
+  indicates no limit.
 
-``NVME_REG_NSSR``
-  NVM Subsystem Reset
+``ofcs``
+  Optional Fabric Commands Support, see :c:type:`enum nvme_id_ctrl_ofcs <nvme_id_ctrl_ofcs>`.
 
-``NVME_REG_AQA``
-  Admin Queue Attributes
+``psd``
+  Power State Descriptors, see :c:type:`struct nvme_id_psd <nvme_id_psd>`.
 
-``NVME_REG_ASQ``
-  Admin SQ Base Address
+``vs``
+  Vendor Specific
 
-``NVME_REG_ACQ``
-  Admin CQ Base Address
 
-``NVME_REG_CMBLOC``
-  Controller Memory Buffer Location
 
-``NVME_REG_CMBSZ``
-  Controller Memory Buffer Size
 
-``NVME_REG_BPINFO``
-  Boot Partition Information
 
-``NVME_REG_BPRSEL``
-  Boot Partition Read Select
+.. c:type:: enum nvme_id_ctrl_cmic
 
-``NVME_REG_BPMBL``
-  Boot Partition Memory Buffer Location
 
-``NVME_REG_CMBMSC``
-  Controller Memory Buffer Memory Space Control
+**Constants**
 
-``NVME_REG_CMBSTS``
-  Controller Memory Buffer Status
+``NVME_CTRL_CMIC_MULTI_PORT``
+  *undescribed*
 
-``NVME_REG_PMRCAP``
-  Persistent Memory Capabilities
+``NVME_CTRL_CMIC_MULTI_CTRL``
+  *undescribed*
 
-``NVME_REG_PMRCTL``
-  Persistent Memory Region Control
+``NVME_CTRL_CMIC_MULTI_SRIOV``
+  *undescribed*
 
-``NVME_REG_PMRSTS``
-  Persistent Memory Region Status
+``NVME_CTRL_CMIC_MULTI_ANA_REPORTING``
+  *undescribed*
 
-``NVME_REG_PMREBS``
-  Persistent Memory Region Elasticity Buffer Size
 
-``NVME_REG_PMRSWTP``
-  Memory Region Sustained Write Throughput
 
-``NVME_REG_PMRMSC``
-  Persistent Memory Region Controller Memory Space Control
 
-``NVME_REG_DBS``
-  SQ 0 Tail Doorbell
+.. c:type:: enum nvme_id_ctrl_oaes
 
+   The typical latency in microseconds to enter Runtime D3
 
-.. c:function:: bool nvme_is_64bit_reg (__u32 offset)
+**Constants**
 
-   Checks if offset of the controller register is a know 64bit value.
+``NVME_CTRL_OAES_NA``
+  *undescribed*
 
-**Parameters**
+``NVME_CTRL_OAES_FA``
+  *undescribed*
 
-``__u32 offset``
-  Offset of controller register field in bytes
+``NVME_CTRL_OAES_ANA``
+  *undescribed*
 
-**Description**
+``NVME_CTRL_OAES_PLEA``
+  *undescribed*
 
-This function does not care about transport so that the offset is not going
-to be checked inside of this function for the unsupported fields in a
-specific transport. For example, BPMBL(Boot Partition Memory Buffer
-Location) register is not supported by fabrics, but it can be chcked here.
+``NVME_CTRL_OAES_LBAS``
+  :
 
-Returns true if given offset is 64bit register, otherwise it returns false.
+``NVME_CTRL_OAES_EGE``
+  *undescribed*
 
 
 
 
-.. c:type:: enum nvme_psd_flags
+.. c:type:: enum nvme_id_ctrl_ctratt
 
-   Possible flag values in nvme power state descriptor
 
 **Constants**
 
-``NVME_PSD_FLAGS_MXPS``
-  Indicates the scale for the Maximum Power
-  field. If this bit is cleared, then the scale of the
-  Maximum Power field is in 0.01 Watts. If this bit is
-  set, then the scale of the Maximum Power field is in
-  0.0001 Watts.
-
-``NVME_PSD_FLAGS_NOPS``
-  Indicates whether the controller processes I/O
-  commands in this power state. If this bit is cleared,
-  then the controller processes I/O commands in this
-  power state. If this bit is set, then the controller
-  does not process I/O commands in this power state.
+``NVME_CTRL_CTRATT_128_ID``
+  *undescribed*
 
+``NVME_CTRL_CTRATT_NON_OP_PSP``
+  *undescribed*
 
+``NVME_CTRL_CTRATT_NVM_SETS``
+  *undescribed*
 
+``NVME_CTRL_CTRATT_READ_RECV_LVLS``
+  *undescribed*
 
-.. c:type:: enum nvme_psd_ps
+``NVME_CTRL_CTRATT_ENDURANCE_GROUPS``
+  *undescribed*
 
-   Known values for :c:type:`struct nvme_psd <nvme_psd>` #ips and #aps. Use with nvme_psd_power_scale() to extract the power scale field to match this enum. NVME_PSD_IPS_100_MICRO_WATT: 0.0001 watt scale NVME_PSD_IPS_10_MILLI_WATT: 0.01 watt scale
+``NVME_CTRL_CTRATT_PREDICTABLE_LAT``
+  *undescribed*
 
-**Constants**
+``NVME_CTRL_CTRATT_TBKAS``
+  *undescribed*
 
-``NVME_PSD_PS_100_MICRO_WATT``
+``NVME_CTRL_CTRATT_NAMESPACE_GRANULARITY``
   *undescribed*
 
-``NVME_PSD_PS_10_MILLI_WATT``
+``NVME_CTRL_CTRATT_SQ_ASSOCIATIONS``
   *undescribed*
 
+``NVME_CTRL_CTRATT_UUID_LIST``
+  *undescribed*
 
-.. c:function:: unsigned nvme_psd_power_scale (__u8 ps)
 
-   power scale occupies the upper 3 bits
 
-**Parameters**
 
-``__u8 ps``
-  *undescribed*
+.. c:type:: enum nvme_id_ctrl_cntrltype
 
 
+**Constants**
 
+``NVME_CTRL_CNTRLTYPE_IO``
+  *undescribed*
 
-.. c:type:: enum nvme_psd_workload
+``NVME_CTRL_CNTRLTYPE_DISCOVERY``
+  *undescribed*
 
-   Specifies a workload hint in the Power Management Feature (see :c:type:`struct nvme_psd <nvme_psd>`.apw) to inform the NVM subsystem or indicate the conditions for the active power level.
+``NVME_CTRL_CNTRLTYPE_ADMIN``
+  *undescribed*
 
-**Constants**
 
-``NVME_PSD_WORKLOAD_1``
-  Extended Idle Period with a Burst of Random Write
-  consists of five minutes of idle followed by
-  thirty-two random write commands of size 1 MiB
-  submitted to a single controller while all other
-  controllers in the NVM subsystem are idle, and then
-  thirty (30) seconds of idle.
 
-``NVME_PSD_WORKLOAD_2``
-  Heavy Sequential Writes consists of 80,000
-  sequential write commands of size 128 KiB submitted to
-  a single controller while all other controllers in the
-  NVM subsystem are idle.  The submission queue(s)
-  should be sufficiently large allowing the host to
-  ensure there are multiple commands pending at all
-  times during the workload.
 
+.. c:type:: enum nvme_id_ctrl_nvmsr
 
+   This field reports information associated with the NVM Subsystem, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.nvmsr.
 
+**Constants**
 
-.. c:type:: struct nvme_id_psd
+``NVME_CTRL_NVMSR_NVMESD``
+  If set, then the NVM Subsystem is part of an NVMe
+  Storage Device; if cleared, then the NVM Subsystem
+  is not part of an NVMe Storage Device.
 
+``NVME_CTRL_NVMSR_NVMEE``
+  If set’, then the NVM Subsystem is part of an NVMe
+  Enclosure; if cleared, then the NVM Subsystem is
+  not part of an NVMe Enclosure.
 
-**Definition**
 
-::
 
-  struct nvme_id_psd {
-    __le16 mp;
-    __u8 rsvd2;
-    __u8 flags;
-    __le32 enlat;
-    __le32 exlat;
-    __u8 rrt;
-    __u8 rrl;
-    __u8 rwt;
-    __u8 rwl;
-    __le16 idlp;
-    __u8 ips;
-    __u8 rsvd19;
-    __le16 actp;
-    __u8 apw;
-    __u8 aps;
-    __u8 rsvd23[8];
-  };
 
-**Members**
+.. c:type:: enum nvme_id_ctrl_vwci
 
-``mp``
-  Maximum Power indicates the sustained maximum power consumed by the
-  NVM subsystem in this power state. The power in Watts is equal to
-  the value in this field multiplied by the scale specified in the Max
-  Power Scale bit (see :c:type:`enum nvme_psd_flags <nvme_psd_flags>`). A value of 0 indicates
-  Maximum Power is not reported.
+   This field indicates information about remaining number of times that VPD contents are able to be updated using the VPD Write command, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.vwci.
 
-``flags``
-  Additional decoding flags, see :c:type:`enum nvme_psd_flags <nvme_psd_flags>`.
+**Constants**
 
-``enlat``
-  Entry Latency indicates the maximum latency in microseconds
-  associated with entering this power state. A value of 0 indicates
-  Entry Latency is not reported.
+``NVME_CTRL_VWCI_VWCR``
+  Mask to get value of VPD Write Cycles Remaining. If
+  the VPD Write Cycle Remaining Valid bit is set, then
+  this field contains a value indicating the remaining
+  number of times that VPD contents are able to be
+  updated using the VPD Write command. If this field is
+  set to 7Fh, then the remaining number of times that
+  VPD contents are able to be updated using the VPD
+  Write command is greater than or equal to 7Fh.
 
-``exlat``
-  Exit Latency indicates the maximum latency in microseconds
-  associated with exiting this power state. A value of 0 indicates
-  Exit Latency is not reported.
+``NVME_CTRL_VWCI_VWCRV``
+  VPD Write Cycle Remaining Valid. If this bit is set,
+  then the VPD Write Cycle Remaining field is valid. If
+  this bit is cleared, then the VPD Write Cycles
+  Remaining field is invalid and cleared to 0h.
 
-``rrt``
-  Relative Read Throughput indicates the read throughput rank
-  associated with this power state relative to others. The value in
-  this is less than the number of supported power states.
 
-``rrl``
-  Relative Reade Latency indicates the read latency rank associated
-  with this power state relative to others. The value in this field is
-  less than the number of supported power states.
 
-``rwt``
-  Relative Write Throughput indicates write throughput rank associated
-  with this power state relative to others. The value in this field is
-  less than the number of supported power states
 
-``rwl``
-  Relative Write Latency indicates the write latency rank associated
-  with this power state relative to others. The value in this field is
-  less than the number of supported power states
+.. c:type:: enum nvme_id_ctrl_mec
 
-``idlp``
-  Idle Power indicates the typical power consumed by the NVM
-  subsystem over 30 seconds in this power state when idle.
+   Flags indicatings the capabilities of the Management Endpoint in the Controller, :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.mec.
 
-``ips``
-  Idle Power Scale indicates the scale for :c:type:`struct nvme_id_psd <nvme_id_psd>`.idlp,
-  see :c:type:`enum nvme_psd_ps <nvme_psd_ps>` for decoding this field.
+**Constants**
 
-``actp``
-  Active Power indicates the largest average power consumed by the
-  NVM subsystem over a 10 second period in this power state with
-  the workload indicated in the Active Power Workload field.
+``NVME_CTRL_MEC_SMBUSME``
+  If set, then the NVM Subsystem contains a Management
+  Endpoint on an SMBus/I2C port.
 
-``apw``
-  Active Power Workload indicates the workload used to calculate
-  maximum power for this power state. See :c:type:`enum nvme_psd_workload <nvme_psd_workload>` for
-  decoding this field.
+``NVME_CTRL_MEC_PCIEME``
+  If set, then the NVM Subsystem contains a Management
+  Endpoint on a PCIe port.
 
-``aps``
-  Active Power Scale indicates the scale for the :c:type:`struct
-  nvme_id_psd <nvme_id_psd>`.actp, see :c:type:`enum nvme_psd_ps <nvme_psd_ps>` for decoding this value.
 
 
 
+.. c:type:: enum nvme_id_ctrl_oacs
 
+   Flags indicating the optional Admin commands and features supported by the controller, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.oacs.
 
-.. c:type:: struct nvme_id_ctrl
+**Constants**
 
-   Identify Controller data structure
+``NVME_CTRL_OACS_SECURITY``
+  If set, then the controller supports the
+  Security Send and Security Receive commands.
 
-**Definition**
+``NVME_CTRL_OACS_FORMAT``
+  If set then the controller supports the Format
+  NVM command.
 
-::
+``NVME_CTRL_OACS_FW``
+  If set, then the controller supports the
+  Firmware Commit and Firmware Image Download commands.
 
-  struct nvme_id_ctrl {
-    __le16 vid;
-    __le16 ssvid;
-    char sn[20];
-    char mn[40];
-    char fr[8];
-    __u8 rab;
-    __u8 ieee[3];
-    __u8 cmic;
-    __u8 mdts;
-    __le16 cntlid;
-    __le32 ver;
-    __le32 rtd3r;
-    __le32 rtd3e;
-    __le32 oaes;
-    __le32 ctratt;
-    __le16 rrls;
-    __u8 rsvd102[9];
-    __u8 cntrltype;
-    __u8 fguid[16];
-    __le16 crdt1;
-    __le16 crdt2;
-    __le16 crdt3;
-    __u8 rsvd134[119];
-    __u8 nvmsr;
-    __u8 vwci;
-    __u8 mec;
-    __le16 oacs;
-    __u8 acl;
-    __u8 aerl;
-    __u8 frmw;
-    __u8 lpa;
-    __u8 elpe;
-    __u8 npss;
-    __u8 avscc;
-    __u8 apsta;
-    __le16 wctemp;
-    __le16 cctemp;
-    __le16 mtfa;
-    __le32 hmpre;
-    __le32 hmmin;
-    __u8 tnvmcap[16];
-    __u8 unvmcap[16];
-    __le32 rpmbs;
-    __le16 edstt;
-    __u8 dsto;
-    __u8 fwug;
-    __le16 kas;
-    __le16 hctma;
-    __le16 mntmt;
-    __le16 mxtmt;
-    __le32 sanicap;
-    __le32 hmminds;
-    __le16 hmmaxd;
-    __le16 nsetidmax;
-    __le16 endgidmax;
-    __u8 anatt;
-    __u8 anacap;
-    __le32 anagrpmax;
-    __le32 nanagrpid;
-    __le32 pels;
-    __u8 rsvd356[156];
-    __u8 sqes;
-    __u8 cqes;
-    __le16 maxcmd;
-    __le32 nn;
-    __le16 oncs;
-    __le16 fuses;
-    __u8 fna;
-    __u8 vwc;
-    __le16 awun;
-    __le16 awupf;
-    __u8 nvscc;
-    __u8 nwpc;
-    __le16 acwu;
-    __u8 rsvd534[2];
-    __le32 sgls;
-    __le32 mnan;
-    __u8 rsvd544[224];
-    char subnqn[NVME_NQN_LENGTH];
-    __u8 rsvd1024[768];
-    __le32 ioccsz;
-    __le32 iorcsz;
-    __le16 icdoff;
-    __u8 fcatt;
-    __u8 msdbd;
-    __le16 ofcs;
-    __u8 rsvd1806[242];
-    struct nvme_id_psd      psd[32];
-    __u8 vs[1024];
-  };
+``NVME_CTRL_OACS_NS_MGMT``
+  If set, then the controller supports the
+  Namespace Management capability
 
-**Members**
+``NVME_CTRL_OACS_SELF_TEST``
+  If set, then the controller supports the Device
+  Self-test command.
 
-``vid``
-  PCI Vendor ID, the company vendor identifier that is assigned by
-  the PCI SIG.
+``NVME_CTRL_OACS_DIRECTIVES``
+  If set, then the controller supports Directives
+  and the Directive Send and Directive Receive
+  commands.
 
-``ssvid``
-  PCI Subsystem Vendor ID, the company vendor identifier that is
-  assigned by the PCI SIG for the subsystem.
+``NVME_CTRL_OACS_NVME_MI``
+  If set, then the controller supports the NVMe-MI
+  Send and NVMe-MI Receive commands.
 
-``sn``
-  Serial Number in ascii
+``NVME_CTRL_OACS_VIRT_MGMT``
+  If set, then the controller supports the
+  Virtualization Management command.
 
-``mn``
-  Model Number in ascii
+``NVME_CTRL_OACS_DBBUF_CFG``
+  If set, then the controller supports the
+  Doorbell Buffer Config command.
 
-``fr``
-  Firmware Revision in ascii, the currently active firmware
-  revision for the NVM subsystem
+``NVME_CTRL_OACS_LBA_STATUS``
+  If set, then the controller supports the Get LBA
+  Status capability.
 
-``rab``
-  Recommended Arbitration Burst, reported as a power of two
 
-``ieee``
-  IEEE assigned Organization Unique Identifier
 
-``cmic``
-  Controller Multipath IO and Namespace Sharing  Capabilities of
-  the controller and NVM subsystem. See :c:type:`enum nvme_id_ctrl_cmic <nvme_id_ctrl_cmic>`.
 
-``mdts``
-  Max Data Transfer Size is the largest data transfer size. The
-  host should not submit a command that exceeds this maximum data
-  transfer size. The value is in units of the minimum memory page
-  size (CAP.MPSMIN) and is reported as a power of two
+.. c:type:: enum nvme_id_ctrl_frmw
 
-``cntlid``
-  Controller ID, the NVM subsystem unique controller identifier
-  associated with the controller.
+   Flags and values indicates capabilities regarding firmware updates from :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.frmw.
 
-``ver``
-  Version, this field contains the value reported in the Version
-  register, or property (see :c:type:`enum nvme_registers <nvme_registers>` ``NVME_REG_VS``).
+**Constants**
 
-``rtd3r``
-  RTD3 Resume Latency, the expected latency in microseconds to resume
-  from Runtime D3
+``NVME_CTRL_FRMW_1ST_RO``
+  If set, the first firmware slot is readonly
 
-``rtd3e``
-  RTD3 Exit Latency, the typical latency in microseconds to enter
-  Runtime D3.
+``NVME_CTRL_FRMW_NR_SLOTS``
+  Mask to get the value of the number of
+  firmware slots that the controller supports.
 
-``oaes``
-  Optional Async Events Supported, see **enum** nvme_id_ctrl_oaes .
+``NVME_CTRL_FRMW_FW_ACT_NO_RESET``
+  If set, the controller supports firmware
+  activation without a reset.
 
-``ctratt``
-  Controller Attributes, see **enum** nvme_id_ctrl_ctratt
 
-``rrls``
-  Read Recovery Levels. If a bit is set, then the corresponding
-  Read Recovery Level is supported. If a bit is cleared, then the
-  corresponding Read Recovery Level is not supported.
 
-``cntrltype``
-  Controller Type, see :c:type:`enum nvme_id_ctrl_cntrltype <nvme_id_ctrl_cntrltype>`
 
-``fguid``
-  FRU GUID, a 128-bit value that is globally unique for a given
-  Field Replaceable Unit
+.. c:type:: enum nvme_id_ctrl_lpa
 
-``crdt1``
-  Controller Retry Delay time in 100 millisecod units if CQE CRD
-  field is 1
+   Flags indicating optional attributes for log pages that are accessed via the Get Log Page command.
 
-``crdt2``
-  Controller Retry Delay time in 100 millisecod units if CQE CRD
-  field is 2
+**Constants**
 
-``crdt3``
-  Controller Retry Delay time in 100 millisecod units if CQE CRD
-  field is 3
+``NVME_CTRL_LPA_SMART_PER_NS``
+  *undescribed*
 
-``nvmsr``
-  NVM Subsystem Report, see :c:type:`enum nvme_id_ctrl_nvmsr <nvme_id_ctrl_nvmsr>`
+``NVME_CTRL_LPA_CMD_EFFECTS``
+  *undescribed*
 
-``vwci``
-  VPD Write Cycle Information, see :c:type:`enum nvme_id_ctrl_vwci <nvme_id_ctrl_vwci>`
+``NVME_CTRL_LPA_EXTENDED``
+  *undescribed*
 
-``mec``
-  Management Endpoint Capabilities, see :c:type:`enum nvme_id_ctrl_mec <nvme_id_ctrl_mec>`
+``NVME_CTRL_LPA_TELEMETRY``
+  *undescribed*
 
-``oacs``
-  Optional Admin Command Support,the optional Admin commands and
-  features supported by the controller, see :c:type:`enum nvme_id_ctrl_oacs <nvme_id_ctrl_oacs>`.
+``NVME_CTRL_LPA_PERSETENT_EVENT``
+  *undescribed*
 
-``acl``
-  Abort Command Limit, the maximum number of concurrently
-  executing Abort commands supported by the controller. This is a
-  0's based value.
 
-``aerl``
-  Async Event Request Limit, the maximum number of concurrently
-  outstanding Asynchronous Event Request commands supported by the
-  controller This is a 0's based value.
 
-``frmw``
-  Firmware Updates indicates capabilities regarding firmware
-  updates. See :c:type:`enum nvme_id_ctrl_frmw <nvme_id_ctrl_frmw>`.
 
-``lpa``
-  Log Page Attributes, see :c:type:`enum nvme_id_ctrl_lpa <nvme_id_ctrl_lpa>`.
+.. c:type:: enum nvme_id_ctrl_avscc
 
-``elpe``
-  Error Log Page Entries, the maximum number of Error Information
-  log entries that are stored by the controller. This field is a
-  0's based value.
+   Flags indicating the configuration settings for Admin Vendor Specific command handling.
 
-``npss``
-  Number of Power States Supported, the number of NVM Express
-  power states supported by the controller, indicating the number
-  of valid entries in :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.psd. This is a 0's
-  based value.
+**Constants**
 
-``avscc``
-  Admin Vendor Specific Command Configuration, see :c:type:`enum
-  nvme_id_ctrl_avscc <nvme_id_ctrl_avscc>`.
+``NVME_CTRL_AVSCC_AVS``
+  If set, all Admin Vendor Specific Commands use the
+  optional vendor specific command format with NDT and
+  NDM fields.
 
-``apsta``
-  Autonomous Power State Transition Attributes, see :c:type:`enum
-  nvme_id_ctrl_apsta <nvme_id_ctrl_apsta>`.
 
-``wctemp``
-  Warning Composite Temperature Threshold indicates
-  the minimum Composite Temperature field value (see :c:type:`struct
-  nvme_smart_log <nvme_smart_log>`.critical_comp_time) that indicates an overheating
-  condition during which controller operation continues.
 
-``cctemp``
-  Critical Composite Temperature Threshold, field indicates the
-  minimum Composite Temperature field value (see :c:type:`struct
-   nvme_smart_log <nvme_smart_log>`.critical_comp_time) that indicates a critical
-  overheating condition.
 
-``mtfa``
-  Maximum Time for Firmware Activation indicates the maximum time
-  the controller temporarily stops processing commands to activate
-  the firmware image, specified in 100 millisecond units. This
-  field is always valid if the controller supports firmware
-  activation without a reset.
+.. c:type:: enum nvme_id_ctrl_apsta
 
-``hmpre``
-  Host Memory Buffer Preferred Size indicates the preferred size
-  that the host is requested to allocate for the Host Memory
-  Buffer feature in 4 KiB units.
+   Flags indicating the attributes of the autonomous power state transition feature.
 
-``hmmin``
-  Host Memory Buffer Minimum Size indicates the minimum size that
-  the host is requested to allocate for the Host Memory Buffer
-  feature in 4 KiB units.
+**Constants**
+
+``NVME_CTRL_APSTA_APST``
+  If set, then the controller supports autonomous power
+  state transitions.
+
+
+
+
+.. c:type:: enum nvme_id_ctrl_rpmbs
+
+   This field indicates if the controller supports one or more Replay Protected Memory Blocks, from :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.rpmbs.
+
+**Constants**
+
+``NVME_CTRL_RPMBS_NR_UNITS``
+  Mask to get the value of the Number of RPMB Units
+
+``NVME_CTRL_RPMBS_AUTH_METHOD``
+  Mask to get the value of the Authentication Method
+
+``NVME_CTRL_RPMBS_TOTAL_SIZE``
+  Mask to get the value of Total Size
+
+``NVME_CTRL_RPMBS_ACCESS_SIZE``
+  Mask to get the value of Access Size
+
+
+
+
+.. c:type:: enum nvme_id_ctrl_dsto
+
+   Flags indicating the optional Device Self-test command or operation behaviors supported by the controller or NVM subsystem.
+
+**Constants**
+
+``NVME_CTRL_DSTO_ONE_DST``
+  If set,  then the NVM subsystem supports only one
+  device self-test operation in progress at a time.
+
+
+
+
+.. c:type:: enum nvme_id_ctrl_hctm
+
+   Flags indicate the attributes of the host controlled thermal management feature
+
+**Constants**
+
+``NVME_CTRL_HCTMA_HCTM``
+  then the controller supports host controlled thermal
+  management, and the Set Features command and Get
+  Features command with the Feature Identifier field
+  set to ``NVME_FEAT_FID_HCTM``.
+
+
+
+
+.. c:type:: enum nvme_id_ctrl_sanicap
+
+   Indicates attributes for sanitize operations.
+
+**Constants**
+
+``NVME_CTRL_SANICAP_CES``
+  Crypto Erase Support. If set, then the
+  controller supports the Crypto Erase sanitize operation.
+
+``NVME_CTRL_SANICAP_BES``
+  Block Erase Support. If set, then the controller
+  supports the Block Erase sanitize operation.
+
+``NVME_CTRL_SANICAP_OWS``
+  Overwrite Support. If set, then the controller
+  supports the Overwrite sanitize operation.
+
+``NVME_CTRL_SANICAP_NDI``
+  No-Deallocate Inhibited. If set and the No-
+  Deallocate Response Mode bit is set, then the
+  controller deallocates after the sanitize
+  operation even if the No-Deallocate After
+  Sanitize bit is set in a Sanitize command.
+
+``NVME_CTRL_SANICAP_NODMMAS``
+  No-Deallocate Modifies Media After Sanitize,
+  mask to extract value.
 
-``tnvmcap``
-  Total NVM Capacity, the total NVM capacity in the NVM subsystem.
-  The value is in bytes.
 
-``unvmcap``
-  Unallocated NVM Capacity, the unallocated NVM capacity in the
-  NVM subsystem. The value is in bytes.
-  **rpmbs**      Replay Protected Memory Block Support, see :c:type:`enum
-  nvme_id_ctrl_rpmbs <nvme_id_ctrl_rpmbs>`.
-  **edstt**      Extended Device Self-test Time, if Device Self-test command is
-  supported (see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.oacs, ``NVME_CTRL_OACS_SELF_TEST``),
-  then this field indicates the nominal amount of time in one
-  minute units that the controller takes to complete an extended
-  device self-test operation when in power state 0.
 
-``dsto``
-  Device Self-test Options, see :c:type:`enum nvme_id_ctrl_dsto <nvme_id_ctrl_dsto>`.
 
-``fwug``
-  Firmware Update Granularity indicates the granularity and
-  alignment requirement of the firmware image being updated by the
-  Firmware Image Download command. The value is reported in 4 KiB
-  units. A value of 0h indicates no information on granularity is
-  provided. A value of FFh indicates no restriction
+.. c:type:: enum nvme_id_ctrl_anacap
 
-``kas``
-  Keep Alive Support indicates the granularity of the Keep Alive
-  Timer in 100 millisecond units.
+   This field indicates the capabilities associated with Asymmetric Namespace Access Reporting.
 
-``hctma``
-  Host Controlled Thermal Management Attributes, see :c:type:`enum nvme_id_ctrl_hctm <nvme_id_ctrl_hctm>`.
+**Constants**
 
-``mntmt``
-  Minimum Thermal Management Temperature indicates the minimum
-  temperature, in degrees Kelvin, that the host may request in the
-  Thermal Management Temperature 1 field and Thermal Management
-  Temperature 2 field of a Set Features command with the Feature
-  Identifier field set to #NVME_FEAT_FID_HCTM.
+``NVME_CTRL_ANACAP_OPT``
+  If set, then the controller is able to
+  report ANA Optimized state.
 
-``mxtmt``
-  Maximum Thermal Management Temperature indicates the maximum
-  temperature, in degrees Kelvin, that the host may request in the
-  Thermal Management Temperature 1 field and Thermal Management
-  Temperature 2 field of the Set Features command with the Feature
-  Identifier set to #NVME_FEAT_FID_HCTM.
+``NVME_CTRL_ANACAP_NON_OPT``
+  If set, then the controller is able to
+  report ANA Non-Optimized state.
 
-``sanicap``
-  Sanitize Capabilities, see :c:type:`enum nvme_id_ctrl_sanicap <nvme_id_ctrl_sanicap>`
+``NVME_CTRL_ANACAP_INACCESSIBLE``
+  If set, then the controller is able to
+  report ANA Inaccessible state.
 
-``hmminds``
-  Host Memory Buffer Minimum Descriptor Entry Size indicates the
-  minimum usable size of a Host Memory Buffer Descriptor Entry in
-  4 KiB units.
+``NVME_CTRL_ANACAP_PERSISTENT_LOSS``
+  If set, then the controller is able to
+  report ANA Persistent Loss state.
 
-``hmmaxd``
-  Host Memory Maximum Descriptors Entries indicates the number of
-  usable Host Memory Buffer Descriptor Entries.
+``NVME_CTRL_ANACAP_CHANGE``
+  If set, then the controller is able to
+  report ANA Change state.
 
-``nsetidmax``
-  NVM Set Identifier Maximum, defines the maximum value of a valid
-  NVM Set Identifier for any controller in the NVM subsystem.
+``NVME_CTRL_ANACAP_GRPID_NO_CHG``
+  If set, then the ANAGRPID field in the
+  Identify Namespace data structure
+  (:c:type:`struct nvme_id_ns <nvme_id_ns>`.anagrpid), does not
+  change while the namespace is attached to
+  any controller.
 
-``endgidmax``
-  Endurance Group Identifier Maximum, defines the maximum value of
-  a valid Endurance Group Identifier for any controller in the NVM
-  subsystem.
+``NVME_CTRL_ANACAP_GRPID_MGMT``
+  If set, then the controller supports a
+  non-zero value in the ANAGRPID field of
+  the Namespace Management command.
 
-``anatt``
-  ANA Transition Time indicates the maximum amount of time, in
-  seconds, for a transition between ANA states or the maximum
-  amount of time, in seconds, that the controller reports the ANA
-  change state.
 
-``anacap``
-  Asymmetric Namespace Access Capabilities, see :c:type:`enum
-  nvme_id_ctrl_anacap <nvme_id_ctrl_anacap>`.
 
-``anagrpmax``
-  ANA Group Identifier Maximum indicates the maximum value of a
-  valid ANA Group Identifier for any controller in the NVM
-  subsystem.
 
-``nanagrpid``
-  Number of ANA Group Identifiers indicates the number of ANA
-  groups supported by this controller.
+.. c:type:: enum nvme_id_ctrl_sqes
 
-``pels``
-  Persistent Event Log Size indicates the maximum reportable size
-  for the Persistent Event Log.
+   Defines the required and maximum Submission Queue entry size when using the NVM Command Set.
 
-``sqes``
-  Submission Queue Entry Size, see :c:type:`enum nvme_id_ctrl_sqes <nvme_id_ctrl_sqes>`.
+**Constants**
 
-``cqes``
-  Completion Queue Entry Size, see :c:type:`enum nvme_id_ctrl_cqes <nvme_id_ctrl_cqes>`.
+``NVME_CTRL_SQES_MIN``
+  Mask to get the value of the required Submission Queue
+  Entry size when using the NVM Command Set.
 
-``maxcmd``
-  Maximum Outstanding Commands indicates the maximum number of
-  commands that the controller processes at one time for a
-  particular queue.
+``NVME_CTRL_SQES_MAX``
+  Mask to get the value of the maximum Submission Queue
+  entry size when using the NVM Command Set.
 
-``nn``
-  Number of Namespaces indicates the maximum value of a valid
-  nsid for the NVM subsystem. If the MNAN (:c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.mnan
-  field is cleared to 0h, then this field also indicates the
-  maximum number of namespaces supported by the NVM.  subsystem.
 
-``oncs``
-  Optional NVM Command Support, see :c:type:`enum nvme_id_ctrl_oncs <nvme_id_ctrl_oncs>`.
 
-``fuses``
-  Fused Operation Support, see :c:type:`enum nvme_id_ctrl_fuses <nvme_id_ctrl_fuses>`.
 
-``fna``
-  Format NVM Attributes, see :c:type:`enum nvme_id_ctrl_fna <nvme_id_ctrl_fna>`.
+.. c:type:: enum 
 
-``vwc``
-  Volatile Write Cache, see :c:type:`enum nvme_id_ctrl_vwc <nvme_id_ctrl_vwc>`.
+   Defines the required and maximum Completion Queue entry size when using the NVM Command Set.
 
-``awun``
-  Atomic Write Unit Normal indicates the size of the write
-  operation guaranteed to be written atomically to the NVM across
-  all namespaces with any supported namespace format during normal
-  operation. This field is specified in logical blocks and is a
-  0's based value.
+**Constants**
 
-``awupf``
-  Atomic Write Unit Power Fail indicates the size of the write
-  operation guaranteed to be written atomically to the NVM across
-  all namespaces with any supported namespace format during a
-  power fail or error condition. This field is specified in
-  logical blocks and is a 0’s based value.
+``NVME_CTRL_CQES_MIN``
+  Mask to get the value of the required Completion Queue
+  Entry size when using the NVM Command Set.
 
-``nvscc``
-  NVM Vendor Specific Command Configuration, see :c:type:`enum
-  nvme_id_ctrl_nvscc <nvme_id_ctrl_nvscc>`.
+``NVME_CTRL_CQES_MAX``
+  Mask to get the value of the maximum Completion Queue
+  entry size when using the NVM Command Set.
 
-``nwpc``
-  Namespace Write Protection Capabilities, see :c:type:`enum
-  nvme_id_ctrl_nwpc <nvme_id_ctrl_nwpc>`.
 
-``acwu``
-  Atomic Compare & Write Unit indicates the size of the write
-  operation guaranteed to be written atomically to the NVM across
-  all namespaces with any supported namespace format for a Compare
-  and Write fused operation. This field is specified in logical
-  blocks and is a 0’s based value.
 
-``sgls``
-  SGL Support, see :c:type:`enum nvme_id_ctrl_sgls <nvme_id_ctrl_sgls>`
 
-``mnan``
-  Maximum Number of Allowed Namespaces indicates the maximum
-  number of namespaces supported by the NVM subsystem.
+.. c:type:: enum nvme_id_ctrl_oncs
 
-``subnqn``
-  NVM Subsystem NVMe Qualified Name, UTF-8 null terminated string
+   This field indicates the optional NVM commands and features supported by the controller.
 
-``ioccsz``
-  I/O Queue Command Capsule Supported Size, defines the maximum
-  I/O command capsule size in 16 byte units.
+**Constants**
 
-``iorcsz``
-  I/O Queue Response Capsule Supported Size, defines the maximum
-  I/O response capsule size in 16 byte units.
+``NVME_CTRL_ONCS_COMPARE``
+  If set, then the controller supports
+  the Compare command.
 
-``icdoff``
-  In Capsule Data Offset, defines the offset where data starts
-  within a capsule. This value is applicable to I/O Queues only.
+``NVME_CTRL_ONCS_WRITE_UNCORRECTABLE``
+  If set, then the controller supports
+  the Write Uncorrectable command.
 
-``fcatt``
-  Fabrics Controller Attributes, see :c:type:`enum nvme_id_ctrl_fcatt <nvme_id_ctrl_fcatt>`.
+``NVME_CTRL_ONCS_DSM``
+  If set, then the controller supports
+  the Dataset Management command.
 
-``msdbd``
-  Maximum SGL Data Block Descriptors indicates the maximum
-  number of SGL Data Block or Keyed SGL Data Block descriptors
-  that a host is allowed to place in a capsule. A value of 0h
-  indicates no limit.
+``NVME_CTRL_ONCS_WRITE_ZEROES``
+  If set, then the controller supports
+  the Write Zeroes command.
 
-``ofcs``
-  Optional Fabric Commands Support, see :c:type:`enum nvme_id_ctrl_ofcs <nvme_id_ctrl_ofcs>`.
+``NVME_CTRL_ONCS_SAVE_FEATURES``
+  If set, then the controller supports
+  the Save field set to a non-zero value
+  in the Set Features command and the
+  Select field set to a non-zero value in
+  the Get Features command.
 
-``psd``
-  Power State Descriptors, see :c:type:`struct nvme_id_psd <nvme_id_psd>`.
+``NVME_CTRL_ONCS_RESERVATIONS``
+  If set, then the controller supports
+  reservations.
 
-``vs``
-  Vendor Specific
+``NVME_CTRL_ONCS_TIMESTAMP``
+  If set, then the controller supports
+  the Timestamp feature.
 
+``NVME_CTRL_ONCS_VERIFY``
+  If set, then the controller supports
+  the Verify command.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_cmic
+.. c:type:: enum nvme_id_ctrl_fuses
 
+   This field indicates the fused operations that the controller supports.
 
 **Constants**
 
-``NVME_CTRL_CMIC_MULTI_PORT``
-  *undescribed*
+``NVME_CTRL_FUSES_COMPARE_AND_WRITE``
+  If set, then the controller supports the
+  Compare and Write fused operation.
 
-``NVME_CTRL_CMIC_MULTI_CTRL``
-  *undescribed*
 
-``NVME_CTRL_CMIC_MULTI_SRIOV``
-  *undescribed*
 
-``NVME_CTRL_CMIC_MULTI_ANA_REPORTING``
-  *undescribed*
+
+.. c:type:: enum nvme_id_ctrl_fna
+
+   This field indicates attributes for the Format NVM command.
+
+**Constants**
+
+``NVME_CTRL_FNA_FMT_ALL_NAMESPACES``
+  If set, then all namespaces in an NVM
+  subsystem shall be configured with the
+  same attributes and a format (excluding
+  secure erase) of any namespace results in
+  a format of all namespaces in an NVM
+  subsystem. If cleared, then the
+  controller supports format on a per
+  namespace basis.
+
+``NVME_CTRL_FNA_SEC_ALL_NAMESPACES``
+  If set, then any secure erase performed
+  as part of a format operation results in
+  a secure erase of all namespaces in the
+  NVM subsystem. If cleared, then any
+  secure erase performed as part of a
+  format results in a secure erase of the
+  particular namespace specified.
+
+``NVME_CTRL_FNA_CRYPTO_ERASE``
+  If set, then cryptographic erase is
+  supported. If cleared, then cryptographic
+  erase is not supported.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_oaes
+.. c:type:: enum nvme_id_ctrl_vwc
 
-   The typical latency in microseconds to enter Runtime D3
 
 **Constants**
 
-``NVME_CTRL_OAES_NA``
-  *undescribed*
-
-``NVME_CTRL_OAES_FA``
-  *undescribed*
-
-``NVME_CTRL_OAES_ANA``
-  *undescribed*
-
-``NVME_CTRL_OAES_PLEA``
-  *undescribed*
-
-``NVME_CTRL_OAES_LBAS``
-  :
+``NVME_CTRL_VWC_PRESENT``
+  If set, indicates a volatile write cache is present.
+  If a volatile write cache is present, then the host
+  controls whether the volatile write cache is enabled
+  with a Set Features command specifying the value
+  ``NVME_FEAT_FID_VOLATILE_WC``.
 
-``NVME_CTRL_OAES_EGE``
-  *undescribed*
+``NVME_CTRL_VWC_FLUSH``
+  Mask to get the value of the flush command behavior.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_ctratt
+.. c:type:: enum nvme_id_ctrl_nvscc
 
+   This field indicates the configuration settings for NVM Vendor Specific command handling.
 
 **Constants**
 
-``NVME_CTRL_CTRATT_128_ID``
-  *undescribed*
+``NVME_CTRL_NVSCC_FMT``
+  If set, all NVM Vendor Specific Commands use the
+  format format with NDT and NDM fields.
 
-``NVME_CTRL_CTRATT_NON_OP_PSP``
-  *undescribed*
 
-``NVME_CTRL_CTRATT_NVM_SETS``
-  *undescribed*
 
-``NVME_CTRL_CTRATT_READ_RECV_LVLS``
-  *undescribed*
 
-``NVME_CTRL_CTRATT_ENDURANCE_GROUPS``
-  *undescribed*
+.. c:type:: enum nvme_id_ctrl_nwpc
 
-``NVME_CTRL_CTRATT_PREDICTABLE_LAT``
-  *undescribed*
+   This field indicates the optional namespace write protection capabilities supported by the controller.
 
-``NVME_CTRL_CTRATT_TBKAS``
-  *undescribed*
+**Constants**
 
-``NVME_CTRL_CTRATT_NAMESPACE_GRANULARITY``
-  *undescribed*
+``NVME_CTRL_NWPC_WRITE_PROTECT``
+  If set, then the controller shall
+  support the No Write Protect and
+  Write Protect namespace write
+  protection states and may support
+  the Write Protect Until Power
+  Cycle state and Permanent Write
+  Protect namespace write
+  protection states.
 
-``NVME_CTRL_CTRATT_SQ_ASSOCIATIONS``
-  *undescribed*
+``NVME_CTRL_NWPC_WRITE_PROTECT_POWER_CYCLE``
+  If set, then the controller
+  supports the Write Protect Until
+  Power Cycle state.
 
-``NVME_CTRL_CTRATT_UUID_LIST``
-  *undescribed*
+``NVME_CTRL_NWPC_WRITE_PROTECT_PERMANENT``
+  If set, then the controller
+  supports the Permanent Write
+  Protect state.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_cntrltype
+.. c:type:: enum nvme_id_ctrl_sgls
 
+   This field indicates if SGLs are supported for the NVM Command Set and the particular SGL types supported.
 
 **Constants**
 
-``NVME_CTRL_CNTRLTYPE_IO``
+``NVME_CTRL_SGLS_SUPPORTED``
   *undescribed*
 
-``NVME_CTRL_CNTRLTYPE_DISCOVERY``
+``NVME_CTRL_SGLS_KEYED``
   *undescribed*
 
-``NVME_CTRL_CNTRLTYPE_ADMIN``
+``NVME_CTRL_SGLS_BIT_BUCKET``
   *undescribed*
 
+``NVME_CTRL_SGLS_MPTR_BYTE_ALIGNED``
+  *undescribed*
 
+``NVME_CTRL_SGLS_OVERSIZE``
+  *undescribed*
 
+``NVME_CTRL_SGLS_MPTR_SGL``
+  *undescribed*
 
-.. c:type:: enum nvme_id_ctrl_nvmsr
-
-   This field reports information associated with the NVM Subsystem, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.nvmsr.
-
-**Constants**
-
-``NVME_CTRL_NVMSR_NVMESD``
-  If set, then the NVM Subsystem is part of an NVMe
-  Storage Device; if cleared, then the NVM Subsystem
-  is not part of an NVMe Storage Device.
+``NVME_CTRL_SGLS_OFFSET``
+  *undescribed*
 
-``NVME_CTRL_NVMSR_NVMEE``
-  If set’, then the NVM Subsystem is part of an NVMe
-  Enclosure; if cleared, then the NVM Subsystem is
-  not part of an NVMe Enclosure.
+``NVME_CTRL_SGLS_TPORT``
+  *undescribed*
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_vwci
+.. c:type:: enum nvme_id_ctrl_fcatt
 
-   This field indicates information about remaining number of times that VPD contents are able to be updated using the VPD Write command, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.vwci.
+   This field indicates attributes of the controller that are specific to NVMe over Fabrics.
 
 **Constants**
 
-``NVME_CTRL_VWCI_VWCR``
-  Mask to get value of VPD Write Cycles Remaining. If
-  the VPD Write Cycle Remaining Valid bit is set, then
-  this field contains a value indicating the remaining
-  number of times that VPD contents are able to be
-  updated using the VPD Write command. If this field is
-  set to 7Fh, then the remaining number of times that
-  VPD contents are able to be updated using the VPD
-  Write command is greater than or equal to 7Fh.
-
-``NVME_CTRL_VWCI_VWCRV``
-  VPD Write Cycle Remaining Valid. If this bit is set,
-  then the VPD Write Cycle Remaining field is valid. If
-  this bit is cleared, then the VPD Write Cycles
-  Remaining field is invalid and cleared to 0h.
+``NVME_CTRL_FCATT_DYNAMIC``
+  If cleared, then the NVM subsystem uses a dynamic
+  controller model. If set, then the NVM subsystem
+  uses a static controller model.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_mec
+.. c:type:: enum nvme_id_ctrl_ofcs
 
-   Flags indicatings the capabilities of the Management Endpoint in the Controller, :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.mec.
+   Indicate whether the controller supports optional fabric commands.
 
 **Constants**
 
-``NVME_CTRL_MEC_SMBUSME``
-  If set, then the NVM Subsystem contains a Management
-  Endpoint on an SMBus/I2C port.
-
-``NVME_CTRL_MEC_PCIEME``
-  If set, then the NVM Subsystem contains a Management
-  Endpoint on a PCIe port.
-
-
-
+``NVME_CTRL_OFCS_DISCONNECT``
+  If set, then the controller supports the
+  Disconnect command and deletion of individual
+  I/O Queues.
 
-.. c:type:: enum nvme_id_ctrl_oacs
 
-   Flags indicating the optional Admin commands and features supported by the controller, see :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.oacs.
 
-**Constants**
 
-``NVME_CTRL_OACS_SECURITY``
-  If set, then the controller supports the
-  Security Send and Security Receive commands.
+.. c:type:: struct nvme_lbaf
 
-``NVME_CTRL_OACS_FORMAT``
-  If set then the controller supports the Format
-  NVM command.
+   LBA Format Data Structure
 
-``NVME_CTRL_OACS_FW``
-  If set, then the controller supports the
-  Firmware Commit and Firmware Image Download commands.
+**Definition**
 
-``NVME_CTRL_OACS_NS_MGMT``
-  If set, then the controller supports the
-  Namespace Management capability
+::
 
-``NVME_CTRL_OACS_SELF_TEST``
-  If set, then the controller supports the Device
-  Self-test command.
+  struct nvme_lbaf {
+    __le16 ms;
+    __u8 ds;
+    __u8 rp;
+  };
 
-``NVME_CTRL_OACS_DIRECTIVES``
-  If set, then the controller supports Directives
-  and the Directive Send and Directive Receive
-  commands.
+**Members**
 
-``NVME_CTRL_OACS_NVME_MI``
-  If set, then the controller supports the NVMe-MI
-  Send and NVMe-MI Receive commands.
+``ms``
+  Metadata Size indicates the number of metadata bytes provided per LBA
+  based on the LBA Data Size indicated.
 
-``NVME_CTRL_OACS_VIRT_MGMT``
-  If set, then the controller supports the
-  Virtualization Management command.
+``ds``
+  LBA Data Size indicates the LBA data size supported, reported as a
+  power of two.
 
-``NVME_CTRL_OACS_DBBUF_CFG``
-  If set, then the controller supports the
-  Doorbell Buffer Config command.
+``rp``
+  Relative Performance, see :c:type:`enum nvme_lbaf_rp <nvme_lbaf_rp>`.
 
-``NVME_CTRL_OACS_LBA_STATUS``
-  If set, then the controller supports the Get LBA
-  Status capability.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_frmw
+.. c:type:: enum nvme_lbaf_rp
 
-   Flags and values indicates capabilities regarding firmware updates from :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.frmw.
+   This field indicates the relative performance of the LBA format indicated relative to other LBA formats supported by the controller.
 
 **Constants**
 
-``NVME_CTRL_FRMW_1ST_RO``
-  If set, the first firmware slot is readonly
-
-``NVME_CTRL_FRMW_NR_SLOTS``
-  Mask to get the value of the number of
-  firmware slots that the controller supports.
-
-``NVME_CTRL_FRMW_FW_ACT_NO_RESET``
-  If set, the controller supports firmware
-  activation without a reset.
-
+``NVME_LBAF_RP_BEST``
+  Best performance
 
+``NVME_LBAF_RP_BETTER``
+  Better performance
 
+``NVME_LBAF_RP_GOOD``
+  Good performance
 
-.. c:type:: enum nvme_id_ctrl_lpa
+``NVME_LBAF_RP_DEGRADED``
+  Degraded performance
 
-   Flags indicating optional attributes for log pages that are accessed via the Get Log Page command.
+``NVME_LBAF_RP_MASK``
+  Mask to get the relative performance value from the
+  field
 
-**Constants**
 
-``NVME_CTRL_LPA_SMART_PER_NS``
-  *undescribed*
 
-``NVME_CTRL_LPA_CMD_EFFECTS``
-  *undescribed*
 
-``NVME_CTRL_LPA_EXTENDED``
-  *undescribed*
+.. c:type:: struct nvme_id_ns
 
-``NVME_CTRL_LPA_TELEMETRY``
-  *undescribed*
+   Identify Namespace data structure
 
-``NVME_CTRL_LPA_PERSETENT_EVENT``
-  *undescribed*
+**Definition**
 
+::
 
+  struct nvme_id_ns {
+    __le64 nsze;
+    __le64 ncap;
+    __le64 nuse;
+    __u8 nsfeat;
+    __u8 nlbaf;
+    __u8 flbas;
+    __u8 mc;
+    __u8 dpc;
+    __u8 dps;
+    __u8 nmic;
+    __u8 rescap;
+    __u8 fpi;
+    __u8 dlfeat;
+    __le16 nawun;
+    __le16 nawupf;
+    __le16 nacwu;
+    __le16 nabsn;
+    __le16 nabo;
+    __le16 nabspf;
+    __le16 noiob;
+    __u8 nvmcap[16];
+    __le16 npwg;
+    __le16 npwa;
+    __le16 npdg;
+    __le16 npda;
+    __le16 nows;
+    __u8 rsvd74[18];
+    __le32 anagrpid;
+    __u8 rsvd96[3];
+    __u8 nsattr;
+    __le16 nvmsetid;
+    __le16 endgid;
+    __u8 nguid[16];
+    __u8 eui64[8];
+    struct nvme_lbaf        lbaf[16];
+    __u8 rsvd192[192];
+    __u8 vs[3712];
+  };
 
+**Members**
 
-.. c:type:: enum nvme_id_ctrl_avscc
+``nsze``
+  Namespace Size indicates the total size of the namespace in
+  logical blocks. The number of logical blocks is based on the
+  formatted LBA size.
 
-   Flags indicating the configuration settings for Admin Vendor Specific command handling.
+``ncap``
+  Namespace Capacity indicates the maximum number of logical blocks
+  that may be allocated in the namespace at any point in time. The
+  number of logical blocks is based on the formatted LBA size.
 
-**Constants**
+``nuse``
+  Namespace Utilization indicates the current number of logical
+  blocks allocated in the namespace. This field is smaller than or
+  equal to the Namespace Capacity. The number of logical blocks is
+  based on the formatted LBA size.
 
-``NVME_CTRL_AVSCC_AVS``
-  If set, all Admin Vendor Specific Commands use the
-  optional vendor specific command format with NDT and
-  NDM fields.
+``nsfeat``
+  Namespace Features, see :c:type:`enum nvme_id_nsfeat <nvme_id_nsfeat>`.
 
+``nlbaf``
+  Number of LBA Formats defines the number of supported LBA data
+  size and metadata size combinations supported by the namespace
+  and the highest possible index to :c:type:`struct nvme_id_ns <nvme_id_ns>`.labf.
 
+``flbas``
+  Formatted LBA Size, see :c:type:`enum nvme_id_ns_flbas <nvme_id_ns_flbas>`.
 
+``mc``
+  Metadata Capabilities, see :c:type:`enum nvme_id_ns_mc <nvme_id_ns_mc>`.
 
-.. c:type:: enum nvme_id_ctrl_apsta
+``dpc``
+  End-to-end Data Protection Capabilities, see
+  :c:type:`enum nvme_id_ns_dpc <nvme_id_ns_dpc>`.
 
-   Flags indicating the attributes of the autonomous power state transition feature.
+``dps``
+  End-to-end Data Protection Type Settings, see
+  :c:type:`enum nvme_id_ns_dps <nvme_id_ns_dps>`.
 
-**Constants**
+``nmic``
+  Namespace Multi-path I/O and Namespace Sharing Capabilities, see
+  :c:type:`enum nvme_id_ns_nmic <nvme_id_ns_nmic>`.
 
-``NVME_CTRL_APSTA_APST``
-  If set, then the controller supports autonomous power
-  state transitions.
+``rescap``
+  Reservation Capabilities, see :c:type:`enum nvme_id_ns_rescap <nvme_id_ns_rescap>`.
 
+``fpi``
+  Format Progress Indicator, see :c:type:`enum nvme_nd_ns_fpi <nvme_nd_ns_fpi>`.
 
+``dlfeat``
+  Deallocate Logical Block Features, see :c:type:`enum nvme_id_ns_dlfeat <nvme_id_ns_dlfeat>`.
 
+``nawun``
+  Namespace Atomic Write Unit Normal indicates the
+  namespace specific size of the write operation guaranteed to be
+  written atomically to the NVM during normal operation.
 
-.. c:type:: enum nvme_id_ctrl_rpmbs
+``nawupf``
+  Namespace Atomic Write Unit Power Fail indicates the
+  namespace specific size of the write operation guaranteed to be
+  written atomically to the NVM during a power fail or error
+  condition.
 
-   This field indicates if the controller supports one or more Replay Protected Memory Blocks, from :c:type:`struct nvme_id_ctrl <nvme_id_ctrl>`.rpmbs.
+``nacwu``
+  Namespace Atomic Compare & Write Unit indicates the namespace
+  specific size of the write operation guaranteed to be written
+  atomically to the NVM for a Compare and Write fused command.
 
-**Constants**
+``nabsn``
+  Namespace Atomic Boundary Size Normal indicates the atomic
+  boundary size for this namespace for the NAWUN value. This field
+  is specified in logical blocks.
 
-``NVME_CTRL_RPMBS_NR_UNITS``
-  Mask to get the value of the Number of RPMB Units
+``nabo``
+  Namespace Atomic Boundary Offset indicates the LBA on this
+  namespace where the first atomic boundary starts.
 
-``NVME_CTRL_RPMBS_AUTH_METHOD``
-  Mask to get the value of the Authentication Method
+``nabspf``
+  Namespace Atomic Boundary Size Power Fail indicates the atomic
+  boundary size for this namespace specific to the Namespace Atomic
+  Write Unit Power Fail value. This field is specified in logical
+  blocks.
 
-``NVME_CTRL_RPMBS_TOTAL_SIZE``
-  Mask to get the value of Total Size
+``noiob``
+  Namespace Optimal I/O Boundary indicates the optimal I/O boundary
+  for this namespace. This field is specified in logical blocks.
+  The host should construct Read and Write commands that do not
+  cross the I/O boundary to achieve optimal performance.
 
-``NVME_CTRL_RPMBS_ACCESS_SIZE``
-  Mask to get the value of Access Size
+``nvmcap``
+  NVM Capacity indicates the total size of the NVM allocated to
+  this namespace. The value is in bytes.
 
+``npwg``
+  Namespace Preferred Write Granularity indicates the smallest
+  recommended write granularity in logical blocks for this
+  namespace. This is a 0's based value.
 
+``npwa``
+  Namespace Preferred Write Alignment indicates the recommended
+  write alignment in logical blocks for this namespace. This is a
+  0's based value.
 
+``npdg``
+  Namespace Preferred Deallocate Granularity indicates the
+  recommended granularity in logical blocks for the Dataset
+  Management command with the Attribute - Deallocate bit.
 
-.. c:type:: enum nvme_id_ctrl_dsto
+``npda``
+  Namespace Preferred Deallocate Alignment indicates the
+  recommended alignment in logical blocks for the Dataset
+  Management command with the Attribute - Deallocate bit
 
-   Flags indicating the optional Device Self-test command or operation behaviors supported by the controller or NVM subsystem.
+``nows``
+  Namespace Optimal Write Size indicates the size in logical blocks
+  for optimal write performance for this namespace. This is a 0's
+  based value.
 
-**Constants**
+``anagrpid``
+  ANA Group Identifier indicates the ANA Group Identifier of the
+  ANA group of which the namespace is a member.
 
-``NVME_CTRL_DSTO_ONE_DST``
-  If set,  then the NVM subsystem supports only one
-  device self-test operation in progress at a time.
+``nsattr``
+  Namespace Attributes, see :c:type:`enum nvme_id_ns_attr <nvme_id_ns_attr>`.
 
+``nvmsetid``
+  NVM Set Identifier indicates the NVM Set with which this
+  namespace is associated.
 
+``endgid``
+  Endurance Group Identifier indicates the Endurance Group with
+  which this namespace is associated.
 
+``nguid``
+  Namespace Globally Unique Identifier contains a 128-bit value
+  that is globally unique and assigned to the namespace when the
+  namespace is created. This field remains fixed throughout the
+  life of the namespace and is preserved across namespace and
+  controller operations
 
-.. c:type:: enum nvme_id_ctrl_hctm
+``eui64``
+  IEEE Extended Unique Identifier contains a 64-bit IEEE Extended
+  Unique Identifier (EUI-64) that is globally unique and assigned
+  to the namespace when the namespace is created. This field
+  remains fixed throughout the life of the namespace and is
+  preserved across namespace and controller operations
 
-   Flags indicate the attributes of the host controlled thermal management feature
+``lbaf``
+  LBA Format, see :c:type:`struct nvme_lbaf <nvme_lbaf>`.
 
-**Constants**
+``vs``
+  Vendor Specific
 
-``NVME_CTRL_HCTMA_HCTM``
-  then the controller supports host controlled thermal
-  management, and the Set Features command and Get
-  Features command with the Feature Identifier field
-  set to ``NVME_FEAT_FID_HCTM``.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_sanicap
+.. c:type:: enum nvme_id_nsfeat
 
-   Indicates attributes for sanitize operations.
+   This field defines features of the namespace.
 
 **Constants**
 
-``NVME_CTRL_SANICAP_CES``
-  Crypto Erase Support. If set, then the
-  controller supports the Crypto Erase sanitize operation.
+``NVME_NS_FEAT_THIN``
+  If set, indicates that the namespace supports thin
+  provisioning. Specifically, the Namespace Capacity
+  reported may be less than the Namespace Size.
 
-``NVME_CTRL_SANICAP_BES``
-  Block Erase Support. If set, then the controller
-  supports the Block Erase sanitize operation.
+``NVME_NS_FEAT_NATOMIC``
+  If set, indicates that the fields NAWUN, NAWUPF, and
+  NACWU are defined for this namespace and should be
+  used by the host for this namespace instead of the
+  AWUN, AWUPF, and ACWU fields in the Identify
+  Controller data structure.
 
-``NVME_CTRL_SANICAP_OWS``
-  Overwrite Support. If set, then the controller
-  supports the Overwrite sanitize operation.
+``NVME_NS_FEAT_DULBE``
+  If set, indicates that the controller supports the
+  Deallocated or Unwritten Logical Block error for
+  this namespace.  **NVME_NS_FEAT_ID_REUSE**: If set,
+  indicates that the value in the NGUID field for this
+  namespace, if non- zero, is never reused by the
+  controller and that the value in the EUI64 field for
+  this namespace, if non-zero, is never reused by the
+  controller.
 
-``NVME_CTRL_SANICAP_NDI``
-  No-Deallocate Inhibited. If set and the No-
-  Deallocate Response Mode bit is set, then the
-  controller deallocates after the sanitize
-  operation even if the No-Deallocate After
-  Sanitize bit is set in a Sanitize command.
+``NVME_NS_FEAT_ID_REUSE``
+  *undescribed*
 
-``NVME_CTRL_SANICAP_NODMMAS``
-  No-Deallocate Modifies Media After Sanitize,
-  mask to extract value.
+``NVME_NS_FEAT_IO_OPT``
+  If set, indicates that the fields NPWG, NPWA, NPDG,
+  NPDA, and NOWS are defined for this namespace and
+  should be used by the host for I/O optimization
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_anacap
+.. c:type:: enum nvme_id_ns_flbas
 
-   This field indicates the capabilities associated with Asymmetric Namespace Access Reporting.
+   This field indicates the LBA data size & metadata size combination that the namespace has been formatted with
 
 **Constants**
 
-``NVME_CTRL_ANACAP_OPT``
-  If set, then the controller is able to
-  report ANA Optimized state.
-
-``NVME_CTRL_ANACAP_NON_OPT``
-  If set, then the controller is able to
-  report ANA Non-Optimized state.
-
-``NVME_CTRL_ANACAP_INACCESSIBLE``
-  If set, then the controller is able to
-  report ANA Inaccessible state.
-
-``NVME_CTRL_ANACAP_PERSISTENT_LOSS``
-  If set, then the controller is able to
-  report ANA Persistent Loss state.
-
-``NVME_CTRL_ANACAP_CHANGE``
-  If set, then the controller is able to
-  report ANA Change state.
-
-``NVME_CTRL_ANACAP_GRPID_NO_CHG``
-  If set, then the ANAGRPID field in the
-  Identify Namespace data structure
-  (:c:type:`struct nvme_id_ns <nvme_id_ns>`.anagrpid), does not
-  change while the namespace is attached to
-  any controller.
+``NVME_NS_FLBAS_LBA_MASK``
+  Mask to get the index of one of the 16 supported
+  LBA Formats indicated in :c:type:`struct nvme_id_ns <nvme_id_ns>`.lbaf.
 
-``NVME_CTRL_ANACAP_GRPID_MGMT``
-  If set, then the controller supports a
-  non-zero value in the ANAGRPID field of
-  the Namespace Management command.
+``NVME_NS_FLBAS_META_EXT``
+  Applicable only if format contains metadata. If
+  this bit is set, indicates that the metadata is
+  transferred at the end of the data LBA, creating an
+  extended data LBA. If cleared, indicates that all
+  of the metadata for a command is transferred as a
+  separate contiguous buffer of data.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_sqes
+.. c:type:: enum nvme_id_ns_mc
 
-   Defines the required and maximum Submission Queue entry size when using the NVM Command Set.
+   This field indicates the capabilities for metadata.
 
 **Constants**
 
-``NVME_CTRL_SQES_MIN``
-  Mask to get the value of the required Submission Queue
-  Entry size when using the NVM Command Set.
+``NVME_NS_MC_EXTENDED``
+  If set, indicates the namespace supports the metadata
+  being transferred as part of a separate buffer that is
+  specified in the Metadata Pointer.
 
-``NVME_CTRL_SQES_MAX``
-  Mask to get the value of the maximum Submission Queue
-  entry size when using the NVM Command Set.
+``NVME_NS_MC_SEPARATE``
+  If set, indicates that the namespace supports the
+  metadata being transferred as part of an extended data LBA.
 
 
 
 
-.. c:type:: enum 
+.. c:type:: enum nvme_id_ns_dpc
 
-   Defines the required and maximum Completion Queue entry size when using the NVM Command Set.
+   This field indicates the capabilities for the end-to-end data protection feature.
 
 **Constants**
 
-``NVME_CTRL_CQES_MIN``
-  Mask to get the value of the required Completion Queue
-  Entry size when using the NVM Command Set.
+``NVME_NS_DPC_PI_TYPE1``
+  If set, indicates that the namespace supports
+  Protection Information Type 1.
 
-``NVME_CTRL_CQES_MAX``
-  Mask to get the value of the maximum Completion Queue
-  entry size when using the NVM Command Set.
+``NVME_NS_DPC_PI_TYPE2``
+  If set, indicates that the namespace supports
+  Protection Information Type 2.
 
+``NVME_NS_DPC_PI_TYPE3``
+  If set, indicates that the namespace supports
+  Protection Information Type 3.
 
+``NVME_NS_DPC_PI_FIRST``
+  If set, indicates that the namespace supports
+  protection information transferred as the first eight
+  bytes of metadata.
 
+``NVME_NS_DPC_PI_LAST``
+  If set, indicates that the namespace supports
+  protection information transferred as the last eight
+  bytes of metadata.
 
-.. c:type:: enum nvme_id_ctrl_oncs
 
-   This field indicates the optional NVM commands and features supported by the controller.
 
-**Constants**
 
-``NVME_CTRL_ONCS_COMPARE``
-  If set, then the controller supports
-  the Compare command.
+.. c:type:: enum nvme_id_ns_dps
 
-``NVME_CTRL_ONCS_WRITE_UNCORRECTABLE``
-  If set, then the controller supports
-  the Write Uncorrectable command.
+   This field indicates the Type settings for the end-to-end data protection feature.
 
-``NVME_CTRL_ONCS_DSM``
-  If set, then the controller supports
-  the Dataset Management command.
+**Constants**
 
-``NVME_CTRL_ONCS_WRITE_ZEROES``
-  If set, then the controller supports
-  the Write Zeroes command.
+``NVME_NS_DPS_PI_NONE``
+  Protection information is not enabled
 
-``NVME_CTRL_ONCS_SAVE_FEATURES``
-  If set, then the controller supports
-  the Save field set to a non-zero value
-  in the Set Features command and the
-  Select field set to a non-zero value in
-  the Get Features command.
+``NVME_NS_DPS_PI_TYPE1``
+  Protection information is enabled, Type 1
 
-``NVME_CTRL_ONCS_RESERVATIONS``
-  If set, then the controller supports
-  reservations.
+``NVME_NS_DPS_PI_TYPE2``
+  Protection information is enabled, Type 2
 
-``NVME_CTRL_ONCS_TIMESTAMP``
-  If set, then the controller supports
-  the Timestamp feature.
+``NVME_NS_DPS_PI_TYPE3``
+  Protection information is enabled, Type 3
 
-``NVME_CTRL_ONCS_VERIFY``
-  If set, then the controller supports
-  the Verify command.
+``NVME_NS_DPS_PI_MASK``
+  Mask to get the value of the PI type
+
+``NVME_NS_DPS_PI_FIRST``
+  If set, indicates that the protection information, if
+  enabled, is transferred as the first eight bytes of
+  metadata.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_fuses
+.. c:type:: enum nvme_id_ns_nmic
 
-   This field indicates the fused operations that the controller supports.
+   This field specifies multi-path I/O and namespace sharing capabilities of the namespace.
 
 **Constants**
 
-``NVME_CTRL_FUSES_COMPARE_AND_WRITE``
-  If set, then the controller supports the
-  Compare and Write fused operation.
+``NVME_NS_NMIC_SHARED``
+  If set, then the namespace may be attached to two or
+  more controllers in the NVM subsystem concurrently
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_fna
+.. c:type:: enum nvme_id_ns_rescap
 
-   This field indicates attributes for the Format NVM command.
+   This field indicates the reservation capabilities of the namespace.
 
 **Constants**
 
-``NVME_CTRL_FNA_FMT_ALL_NAMESPACES``
-  If set, then all namespaces in an NVM
-  subsystem shall be configured with the
-  same attributes and a format (excluding
-  secure erase) of any namespace results in
-  a format of all namespaces in an NVM
-  subsystem. If cleared, then the
-  controller supports format on a per
-  namespace basis.
+``NVME_NS_RESCAP_PTPL``
+  If set, indicates that the namespace supports the
+  Persist Through Power Loss capability.
 
-``NVME_CTRL_FNA_SEC_ALL_NAMESPACES``
-  If set, then any secure erase performed
-  as part of a format operation results in
-  a secure erase of all namespaces in the
-  NVM subsystem. If cleared, then any
-  secure erase performed as part of a
-  format results in a secure erase of the
-  particular namespace specified.
+``NVME_NS_RESCAP_WE``
+  If set, indicates that the namespace supports the
+  Write Exclusive reservation type.
 
-``NVME_CTRL_FNA_CRYPTO_ERASE``
-  If set, then cryptographic erase is
-  supported. If cleared, then cryptographic
-  erase is not supported.
+``NVME_NS_RESCAP_EA``
+  If set, indicates that the namespace supports the
+  Exclusive Access reservation type.
 
+``NVME_NS_RESCAP_WERO``
+  If set, indicates that the namespace supports the
+  Write Exclusive - Registrants Only reservation type.
 
+``NVME_NS_RESCAP_EARO``
+  If set, indicates that the namespace supports the
+  Exclusive Access - Registrants Only reservation type.
 
+``NVME_NS_RESCAP_WEAR``
+  If set, indicates that the namespace supports the
+  Write Exclusive - All Registrants reservation type.
 
-.. c:type:: enum nvme_id_ctrl_vwc
+``NVME_NS_RESCAP_EAAR``
+  If set, indicates that the namespace supports the
+  Exclusive Access - All Registrants reservation type.
 
+``NVME_NS_RESCAP_IEK_13``
+  If set, indicates that Ignore Existing Key is used
+  as defined in revision 1.3 or later of this specification.
 
-**Constants**
 
-``NVME_CTRL_VWC_PRESENT``
-  If set, indicates a volatile write cache is present.
-  If a volatile write cache is present, then the host
-  controls whether the volatile write cache is enabled
-  with a Set Features command specifying the value
-  ``NVME_FEAT_FID_VOLATILE_WC``.
 
-``NVME_CTRL_VWC_FLUSH``
-  Mask to get the value of the flush command behavior.
 
+.. c:type:: enum nvme_nd_ns_fpi
 
+   If a format operation is in progress, this field indicates the percentage of the namespace that remains to be formatted.
 
+**Constants**
 
-.. c:type:: enum nvme_id_ctrl_nvscc
+``NVME_NS_FPI_REMAINING``
+  Mask to get the format percent remaining value
 
-   This field indicates the configuration settings for NVM Vendor Specific command handling.
+``NVME_NS_FPI_SUPPORTED``
+  If set, indicates that the namespace supports the
+  Format Progress Indicator defined for the field.
 
-**Constants**
 
-``NVME_CTRL_NVSCC_FMT``
-  If set, all NVM Vendor Specific Commands use the
-  format format with NDT and NDM fields.
 
 
+.. c:type:: enum nvme_id_ns_dlfeat
 
+   This field indicates information about features that affect deallocating logical blocks for this namespace.
 
-.. c:type:: enum nvme_id_ctrl_nwpc
+**Constants**
 
-   This field indicates the optional namespace write protection capabilities supported by the controller.
+``NVME_NS_DLFEAT_RB``
+  Mask to get the value of the read behavior
 
-**Constants**
+``NVME_NS_DLFEAT_RB_NR``
+  Read behvaior is not reported
 
-``NVME_CTRL_NWPC_WRITE_PROTECT``
-  If set, then the controller shall
-  support the No Write Protect and
-  Write Protect namespace write
-  protection states and may support
-  the Write Protect Until Power
-  Cycle state and Permanent Write
-  Protect namespace write
-  protection states.
+``NVME_NS_DLFEAT_RB_ALL_0S``
+  A deallocated logical block returns all bytes
+  cleared to 0h.
 
-``NVME_CTRL_NWPC_WRITE_PROTECT_POWER_CYCLE``
-  If set, then the controller
-  supports the Write Protect Until
-  Power Cycle state.
+``NVME_NS_DLFEAT_RB_ALL_FS``
+  A deallocated logical block returns all bytes
+  set to FFh.
 
-``NVME_CTRL_NWPC_WRITE_PROTECT_PERMANENT``
-  If set, then the controller
-  supports the Permanent Write
-  Protect state.
+``NVME_NS_DLFEAT_WRITE_ZEROES``
+  If set, indicates that the controller supports
+  the Deallocate bit in the Write Zeroes command
+  for this namespace.
 
+``NVME_NS_DLFEAT_CRC_GUARD``
+  If set, indicates that the Guard field for
+  deallocated logical blocks that contain
+  protection information is set to the CRC for
+  the value read from the deallocated logical
+  block and its metadata
 
 
 
-.. c:type:: enum nvme_id_ctrl_sgls
 
-   This field indicates if SGLs are supported for the NVM Command Set and the particular SGL types supported.
+.. c:type:: enum nvme_id_ns_attr
 
-**Constants**
+   Specifies attributes of the namespace.
 
-``NVME_CTRL_SGLS_SUPPORTED``
-  *undescribed*
+**Constants**
 
-``NVME_CTRL_SGLS_KEYED``
-  *undescribed*
+``NVME_NS_NSATTR_WRITE_PROTECTED``
+  If set, then the namespace is currently
+  write protected and all write access to the
+  namespace shall fail.
 
-``NVME_CTRL_SGLS_BIT_BUCKET``
-  *undescribed*
 
-``NVME_CTRL_SGLS_MPTR_BYTE_ALIGNED``
-  *undescribed*
 
-``NVME_CTRL_SGLS_OVERSIZE``
-  *undescribed*
 
-``NVME_CTRL_SGLS_MPTR_SGL``
-  *undescribed*
+.. c:type:: struct nvme_ns_id_desc
 
-``NVME_CTRL_SGLS_OFFSET``
-  *undescribed*
 
-``NVME_CTRL_SGLS_TPORT``
-  *undescribed*
+**Definition**
 
+::
 
+  struct nvme_ns_id_desc {
+    __u8 nidt;
+    __u8 nidl;
+    __le16 reserved;
+    __u8 nid[];
+  };
 
+**Members**
 
-.. c:type:: enum nvme_id_ctrl_fcatt
+``nidt``
+  Namespace Identifier Type, see :c:type:`enum nvme_ns_id_desc_nidt <nvme_ns_id_desc_nidt>`
 
-   This field indicates attributes of the controller that are specific to NVMe over Fabrics.
+``nidl``
+  Namespace Identifier Length contains the length in bytes of the
+  :c:type:`struct nvme_id_ns <nvme_id_ns>`.nid.
 
-**Constants**
+``nid``
+  Namespace Identifier contains a value that is globally unique and
+  assigned to the namespace when the namespace is created. The length
+  is defined in :c:type:`struct nvme_id_ns <nvme_id_ns>`.nidl.
 
-``NVME_CTRL_FCATT_DYNAMIC``
-  If cleared, then the NVM subsystem uses a dynamic
-  controller model. If set, then the NVM subsystem
-  uses a static controller model.
 
 
 
 
-.. c:type:: enum nvme_id_ctrl_ofcs
+.. c:type:: enum nvme_ns_id_desc_nidt
 
-   Indicate whether the controller supports optional fabric commands.
+   Known namespace identifier types
 
 **Constants**
 
-``NVME_CTRL_OFCS_DISCONNECT``
-  If set, then the controller supports the
-  Disconnect command and deletion of individual
-  I/O Queues.
+``NVME_NIDT_EUI64``
+  IEEE Extended Unique Identifier, the NID field contains a
+  copy of the EUI64 field in the struct nvme_id_ns.eui64.
+
+``NVME_NIDT_NGUID``
+  Namespace Globally Unique Identifier, the NID field
+  contains a copy of the NGUID field in struct nvme_id_ns.nguid.
 
+``NVME_NIDT_UUID``
+  The NID field contains a 128-bit Universally Unique
+  Identifier (UUID) as specified in RFC 4122.
 
 
 
-.. c:type:: struct nvme_lbaf
 
-   LBA Format Data Structure
+.. c:type:: struct nvme_nvmset_attr
+
+   NVM Set Attributes Entry
 
 **Definition**
 
 ::
 
-  struct nvme_lbaf {
-    __le16 ms;
-    __u8 ds;
-    __u8 rp;
+  struct nvme_nvmset_attr {
+    __le16 id;
+    __le16 endurance_group_id;
+    __u8 rsvd4[4];
+    __le32 random_4k_read_typical;
+    __le32 opt_write_size;
+    __u8 total_nvmset_cap[16];
+    __u8 unalloc_nvmset_cap[16];
+    __u8 rsvd48[80];
   };
 
 **Members**
 
-``ms``
-  Metadata Size indicates the number of metadata bytes provided per LBA
-  based on the LBA Data Size indicated.
+``id``
+  NVM Set Identifier
 
-``ds``
-  LBA Data Size indicates the LBA data size supported, reported as a
-  power of two.
+``endurance_group_id``
+  Endurance Group Identifier
 
-``rp``
-  Relative Performance, see :c:type:`enum nvme_lbaf_rp <nvme_lbaf_rp>`.
+``random_4k_read_typical``
+  Random 4 KiB Read Typical indicates the typical
+  time to complete a 4 KiB random read in 100
+  nanosecond units when the NVM Set is in a
+  Predictable Latency Mode Deterministic Window and
+  there is 1 outstanding command per NVM Set.
 
 
 
 
 
-.. c:type:: enum nvme_lbaf_rp
+.. c:type:: struct nvme_id_nvmset_list
 
-   This field indicates the relative performance of the LBA format indicated relative to other LBA formats supported by the controller.
+    **nid**;
 
-**Constants**
+**Definition**
 
-``NVME_LBAF_RP_BEST``
-  Best performance
+::
 
-``NVME_LBAF_RP_BETTER``
-  Better performance
+  struct nvme_id_nvmset_list {
+    __u8 nid;
+    __u8 rsvd1[127];
+    struct nvme_nvmset_attr ent[NVME_ID_NVMSET_LIST_MAX];
+  };
 
-``NVME_LBAF_RP_GOOD``
-  Good performance
+**Members**
 
-``NVME_LBAF_RP_DEGRADED``
-  Degraded performance
+``ent``
+  ;
 
-``NVME_LBAF_RP_MASK``
-  Mask to get the relative performance value from the
-  field
 
 
 
 
-.. c:type:: struct nvme_id_ns
+.. c:type:: struct nvme_id_ns_granularity_desc
 
-   Identify Namespace data structure
 
 **Definition**
 
 ::
 
-  struct nvme_id_ns {
-    __le64 nsze;
-    __le64 ncap;
-    __le64 nuse;
-    __u8 nsfeat;
-    __u8 nlbaf;
-    __u8 flbas;
-    __u8 mc;
-    __u8 dpc;
-    __u8 dps;
-    __u8 nmic;
-    __u8 rescap;
-    __u8 fpi;
-    __u8 dlfeat;
-    __le16 nawun;
-    __le16 nawupf;
-    __le16 nacwu;
-    __le16 nabsn;
-    __le16 nabo;
-    __le16 nabspf;
-    __le16 noiob;
-    __u8 nvmcap[16];
-    __le16 npwg;
-    __le16 npwa;
-    __le16 npdg;
-    __le16 npda;
-    __le16 nows;
-    __u8 rsvd74[18];
-    __le32 anagrpid;
-    __u8 rsvd96[3];
-    __u8 nsattr;
-    __le16 nvmsetid;
-    __le16 endgid;
-    __u8 nguid[16];
-    __u8 eui64[8];
-    struct nvme_lbaf        lbaf[16];
-    __u8 rsvd192[192];
-    __u8 vs[3712];
+  struct nvme_id_ns_granularity_desc {
+    __le64 namespace_size_granularity;
+    __le64 namespace_capacity_granularity;
   };
 
 **Members**
 
-``nsze``
-  Namespace Size indicates the total size of the namespace in
-  logical blocks. The number of logical blocks is based on the
-  formatted LBA size.
 
-``ncap``
-  Namespace Capacity indicates the maximum number of logical blocks
-  that may be allocated in the namespace at any point in time. The
-  number of logical blocks is based on the formatted LBA size.
 
-``nuse``
-  Namespace Utilization indicates the current number of logical
-  blocks allocated in the namespace. This field is smaller than or
-  equal to the Namespace Capacity. The number of logical blocks is
-  based on the formatted LBA size.
 
-``nsfeat``
-  Namespace Features, see :c:type:`enum nvme_id_nsfeat <nvme_id_nsfeat>`.
 
-``nlbaf``
-  Number of LBA Formats defines the number of supported LBA data
-  size and metadata size combinations supported by the namespace
-  and the highest possible index to :c:type:`struct nvme_id_ns <nvme_id_ns>`.labf.
+.. c:type:: struct nvme_id_ns_granularity_list
 
-``flbas``
-  Formatted LBA Size, see :c:type:`enum nvme_id_ns_flbas <nvme_id_ns_flbas>`.
 
-``mc``
-  Metadata Capabilities, see :c:type:`enum nvme_id_ns_mc <nvme_id_ns_mc>`.
+**Definition**
 
-``dpc``
-  End-to-end Data Protection Capabilities, see :c:type:`enum
-  nvme_id_ns_dpc <nvme_id_ns_dpc>`.
+::
 
-``dps``
-  End-to-end Data Protection Type Settings, see :c:type:`enum
-  nvme_id_ns_dps <nvme_id_ns_dps>`.
+  struct nvme_id_ns_granularity_list {
+    __le32 attributes;
+    __u8 num_descriptors;
+    __u8 rsvd[27];
+    struct nvme_id_ns_granularity_desc entry[NVME_ID_ND_DESCRIPTOR_MAX];
+    __u8 rsvd288[3808];
+  };
 
-``nmic``
-  Namespace Multi-path I/O and Namespace Sharing Capabilities, see
-  :c:type:`enum nvme_id_ns_nmic <nvme_id_ns_nmic>`.
+**Members**
 
-``rescap``
-  Reservation Capabilities, see :c:type:`enum nvme_id_ns_rescap <nvme_id_ns_rescap>`.
 
-``fpi``
-  Format Progress Indicator, see :c:type:`enum nvme_nd_ns_fpi <nvme_nd_ns_fpi>`.
 
-``dlfeat``
-  Deallocate Logical Block Features, see :c:type:`enum nvme_id_ns_dlfeat <nvme_id_ns_dlfeat>`.
 
-``nawun``
-  Namespace Atomic Write Unit Normal indicates the
-  namespace specific size of the write operation guaranteed to be
-  written atomically to the NVM during normal operation.
 
-``nawupf``
-  Namespace Atomic Write Unit Power Fail indicates the
-  namespace specific size of the write operation guaranteed to be
-  written atomically to the NVM during a power fail or error
-  condition.
+.. c:type:: struct nvme_id_uuid_list_entry
 
-``nacwu``
-  Namespace Atomic Compare & Write Unit indicates the namespace
-  specific size of the write operation guaranteed to be written
-  atomically to the NVM for a Compare and Write fused command.
 
-``nabsn``
-  Namespace Atomic Boundary Size Normal indicates the atomic
-  boundary size for this namespace for the NAWUN value. This field
-  is specified in logical blocks.
+**Definition**
 
-``nabo``
-  Namespace Atomic Boundary Offset indicates the LBA on this
-  namespace where the first atomic boundary starts.
+::
 
-``nabspf``
-  Namespace Atomic Boundary Size Power Fail indicates the atomic
-  boundary size for this namespace specific to the Namespace Atomic
-  Write Unit Power Fail value. This field is specified in logical
-  blocks.
+  struct nvme_id_uuid_list_entry {
+    __u8 header;
+    __u8 rsvd1[15];
+    __u8 uuid[16];
+  };
 
-``noiob``
-  Namespace Optimal I/O Boundary indicates the optimal I/O boundary
-  for this namespace. This field is specified in logical blocks.
-  The host should construct Read and Write commands that do not
-  cross the I/O boundary to achieve optimal performance.
+**Members**
 
-``nvmcap``
-  NVM Capacity indicates the total size of the NVM allocated to
-  this namespace. The value is in bytes.
 
-``npwg``
-  Namespace Preferred Write Granularity indicates the smallest
-  recommended write granularity in logical blocks for this
-  namespace. This is a 0's based value.
 
-``npwa``
-  Namespace Preferred Write Alignment indicates the recommended
-  write alignment in logical blocks for this namespace. This is a
-  0's based value.
 
-``npdg``
-  Namespace Preferred Deallocate Granularity indicates the
-  recommended granularity in logical blocks for the Dataset
-  Management command with the Attribute - Deallocate bit.
 
-``npda``
-  Namespace Preferred Deallocate Alignment indicates the
-  recommended alignment in logical blocks for the Dataset
-  Management command with the Attribute - Deallocate bit
+.. c:type:: enum 
+
+
+**Constants**
+
+``NVME_ID_UUID_HDR_ASSOCIATION_MASK``
+  *undescribed*
+
+``NVME_ID_UUID_ASSOCIATION_NONE``
+  *undescribed*
 
-``nows``
-  Namespace Optimal Write Size indicates the size in logical blocks
-  for optimal write performance for this namespace. This is a 0's
-  based value.
+``NVME_ID_UUID_ASSOCIATION_VENDOR``
+  *undescribed*
 
-``anagrpid``
-  ANA Group Identifier indicates the ANA Group Identifier of the
-  ANA group of which the namespace is a member.
+``NVME_ID_UUID_ASSOCIATION_SUBSYSTEM_VENDOR``
+  *undescribed*
 
-``nsattr``
-  Namespace Attributes, see :c:type:`enum nvme_id_ns_attr <nvme_id_ns_attr>`.
 
-``nvmsetid``
-  NVM Set Identifier indicates the NVM Set with which this
-  namespace is associated.
 
-``endgid``
-  Endurance Group Identifier indicates the Endurance Group with
-  which this namespace is associated.
 
-``nguid``
-  Namespace Globally Unique Identifier contains a 128-bit value
-  that is globally unique and assigned to the namespace when the
-  namespace is created. This field remains fixed throughout the
-  life of the namespace and is preserved across namespace and
-  controller operations
+.. c:type:: struct nvme_id_uuid_list
 
-``eui64``
-  IEEE Extended Unique Identifier contains a 64-bit IEEE Extended
-  Unique Identifier (EUI-64) that is globally unique and assigned
-  to the namespace when the namespace is created. This field
-  remains fixed throughout the life of the namespace and is
-  preserved across namespace and controller operations
 
-``lbaf``
-  LBA Format, see :c:type:`struct nvme_lbaf <nvme_lbaf>`.
+**Definition**
 
-``vs``
-  Vendor Specific
+::
 
+  struct nvme_id_uuid_list {
+    __u8 rsvd0[32];
+    struct nvme_id_uuid_list_entry entry[NVME_ID_UUID_LIST_MAX];
+  };
 
+**Members**
 
 
 
-.. c:type:: enum nvme_id_nsfeat
 
-   This field defines features of the namespace.
 
-**Constants**
+.. c:type:: struct nvme_ctrl_list
 
-``NVME_NS_FEAT_THIN``
-  If set, indicates that the namespace supports thin
-  provisioning. Specifically, the Namespace Capacity
-  reported may be less than the Namespace Size.
+    **num**;
 
-``NVME_NS_FEAT_NATOMIC``
-  If set, indicates that the fields NAWUN, NAWUPF, and
-  NACWU are defined for this namespace and should be
-  used by the host for this namespace instead of the
-  AWUN, AWUPF, and ACWU fields in the Identify
-  Controller data structure.
+**Definition**
 
-``NVME_NS_FEAT_DULBE``
-  If set, indicates that the controller supports the
-  Deallocated or Unwritten Logical Block error for
-  this namespace.  **NVME_NS_FEAT_ID_REUSE**: If set,
-  indicates that the value in the NGUID field for this
-  namespace, if non- zero, is never reused by the
-  controller and that the value in the EUI64 field for
-  this namespace, if non-zero, is never reused by the
-  controller.
+::
 
-``NVME_NS_FEAT_ID_REUSE``
-  *undescribed*
+  struct nvme_ctrl_list {
+    __le16 num;
+    __le16 identifier[NVME_ID_CTRL_LIST_MAX];
+  };
 
-``NVME_NS_FEAT_IO_OPT``
-  If set, indicates that the fields NPWG, NPWA, NPDG,
-  NPDA, and NOWS are defined for this namespace and
-  should be used by the host for I/O optimization
+**Members**
 
 
 
 
-.. c:type:: enum nvme_id_ns_flbas
 
-   This field indicates the LBA data size & metadata size combination that the namespace has been formatted with
+.. c:type:: struct nvme_ns_list
 
-**Constants**
 
-``NVME_NS_FLBAS_LBA_MASK``
-  Mask to get the index of one of the 16 supported
-  LBA Formats indicated in :c:type:`struct nvme_id_ns <nvme_id_ns>`.lbaf.
+**Definition**
 
-``NVME_NS_FLBAS_META_EXT``
-  Applicable only if format contains metadata. If
-  this bit is set, indicates that the metadata is
-  transferred at the end of the data LBA, creating an
-  extended data LBA. If cleared, indicates that all
-  of the metadata for a command is transferred as a
-  separate contiguous buffer of data.
+::
 
+  struct nvme_ns_list {
+    __le32 ns[NVME_ID_NS_LIST_MAX];
+  };
 
+**Members**
 
 
-.. c:type:: enum nvme_id_ns_mc
 
-   This field indicates the capabilities for metadata.
 
-**Constants**
 
-``NVME_NS_MC_EXTENDED``
-  If set, indicates the namespace supports the metadata
-  being transferred as part of a separate buffer that is
-  specified in the Metadata Pointer.
+.. c:type:: struct nvme_primary_ctrl_cap
 
-``NVME_NS_MC_SEPARATE``
-  If set, indicates that the namespace supports the
-  metadata being transferred as part of an extended data LBA.
 
+**Definition**
+
+::
 
+  struct nvme_primary_ctrl_cap {
+    __le16 cntlid;
+    __le16 portid;
+    __u8 crt;
+    __u8 rsvd5[27];
+    __le32 vqfrt;
+    __le32 vqrfa;
+    __le16 vqrfap;
+    __le16 vqprt;
+    __le16 vqfrsm;
+    __le16 vqgran;
+    __u8 rsvd48[16];
+    __le32 vifrt;
+    __le32 virfa;
+    __le16 virfap;
+    __le16 viprt;
+    __le16 vifrsm;
+    __le16 vigran;
+    __u8 rsvd80[4016];
+  };
 
+**Members**
 
-.. c:type:: enum nvme_id_ns_dpc
 
-   This field indicates the capabilities for the end-to-end data protection feature.
 
-**Constants**
 
-``NVME_NS_DPC_PI_TYPE1``
-  If set, indicates that the namespace supports
-  Protection Information Type 1.
 
-``NVME_NS_DPC_PI_TYPE2``
-  If set, indicates that the namespace supports
-  Protection Information Type 2.
+.. c:type:: struct nvme_secondary_ctrl
 
-``NVME_NS_DPC_PI_TYPE3``
-  If set, indicates that the namespace supports
-  Protection Information Type 3.
 
-``NVME_NS_DPC_PI_FIRST``
-  If set, indicates that the namespace supports
-  protection information transferred as the first eight
-  bytes of metadata.
+**Definition**
 
-``NVME_NS_DPC_PI_LAST``
-  If set, indicates that the namespace supports
-  protection information transferred as the last eight
-  bytes of metadata.
+::
 
+  struct nvme_secondary_ctrl {
+    __le16 scid;
+    __le16 pcid;
+    __u8 scs;
+    __u8 rsvd5[3];
+    __le16 vfn;
+    __le16 nvq;
+    __le16 nvi;
+    __u8 rsvd14[18];
+  };
 
+**Members**
 
 
-.. c:type:: enum nvme_id_ns_dps
 
-   This field indicates the Type settings for the end-to-end data protection feature.
 
-**Constants**
 
-``NVME_NS_DPS_PI_NONE``
-  Protection information is not enabled
+.. c:type:: struct nvme_secondary_ctrl_list
 
-``NVME_NS_DPS_PI_TYPE1``
-  Protection information is enabled, Type 1
+    **num**;
 
-``NVME_NS_DPS_PI_TYPE2``
-  Protection information is enabled, Type 2
+**Definition**
 
-``NVME_NS_DPS_PI_TYPE3``
-  Protection information is enabled, Type 3
+::
 
-``NVME_NS_DPS_PI_MASK``
-  Mask to get the value of the PI type
+  struct nvme_secondary_ctrl_list {
+    __u8 num;
+    __u8 rsvd[31];
+    struct nvme_secondary_ctrl sc_entry[NVME_ID_SECONDARY_CTRL_MAX];
+  };
 
-``NVME_NS_DPS_PI_FIRST``
-  If set, indicates that the protection information, if
-  enabled, is transferred as the first eight bytes of
-  metadata.
+**Members**
 
 
 
 
-.. c:type:: enum nvme_id_ns_nmic
 
-   This field specifies multi-path I/O and namespace sharing capabilities of the namespace.
+.. c:type:: struct nvme_error_log_page
 
-**Constants**
 
-``NVME_NS_NMIC_SHARED``
-  If set, then the namespace may be attached to two or
-  more controllers in the NVM subsystem concurrently
+**Definition**
 
+::
 
+  struct nvme_error_log_page {
+    __le64 error_count;
+    __le16 sqid;
+    __le16 cmdid;
+    __le16 status_field;
+    __le16 parm_error_location;
+    __le64 lba;
+    __le32 nsid;
+    __u8 vs;
+    __u8 trtype;
+    __u8 rsvd[2];
+    __le64 cs;
+    __le16 trtype_spec_info;
+    __u8 rsvd2[22];
+  };
 
+**Members**
 
-.. c:type:: enum nvme_id_ns_rescap
 
-   This field indicates the reservation capabilities of the namespace.
 
-**Constants**
 
-``NVME_NS_RESCAP_PTPL``
-  If set, indicates that the namespace supports the
-  Persist Through Power Loss capability.
 
-``NVME_NS_RESCAP_WE``
-  If set, indicates that the namespace supports the
-  Write Exclusive reservation type.
+.. c:type:: enum 
 
-``NVME_NS_RESCAP_EA``
-  If set, indicates that the namespace supports the
-  Exclusive Access reservation type.
 
-``NVME_NS_RESCAP_WERO``
-  If set, indicates that the namespace supports the
-  Write Exclusive - Registrants Only reservation type.
+**Constants**
 
-``NVME_NS_RESCAP_EARO``
-  If set, indicates that the namespace supports the
-  Exclusive Access - Registrants Only reservation type.
+``NVME_ERR_PEL_BYTE_MASK``
+  *undescribed*
 
-``NVME_NS_RESCAP_WEAR``
-  If set, indicates that the namespace supports the
-  Write Exclusive - All Registrants reservation type.
+``NVME_ERR_PEL_BIT_MASK``
+  *undescribed*
 
-``NVME_NS_RESCAP_EAAR``
-  If set, indicates that the namespace supports the
-  Exclusive Access - All Registrants reservation type.
 
-``NVME_NS_RESCAP_IEK_13``
-  If set, indicates that Ignore Existing Key is used
-  as defined in revision 1.3 or later of this specification.
 
 
+.. c:type:: struct nvme_smart_log
 
 
-.. c:type:: enum nvme_nd_ns_fpi
+**Definition**
 
-   If a format operation is in progress, this field indicates the percentage of the namespace that remains to be formatted.
+::
 
-**Constants**
+  struct nvme_smart_log {
+    __u8 critical_warning;
+    __u8 temperature[2];
+    __u8 avail_spare;
+    __u8 spare_thresh;
+    __u8 percent_used;
+    __u8 endu_grp_crit_warn_sumry;
+    __u8 rsvd7[25];
+    __u8 data_units_read[16];
+    __u8 data_units_written[16];
+    __u8 host_reads[16];
+    __u8 host_writes[16];
+    __u8 ctrl_busy_time[16];
+    __u8 power_cycles[16];
+    __u8 power_on_hours[16];
+    __u8 unsafe_shutdowns[16];
+    __u8 media_errors[16];
+    __u8 num_err_log_entries[16];
+    __le32 warning_temp_time;
+    __le32 critical_comp_time;
+    __le16 temp_sensor[8];
+    __le32 thm_temp1_trans_count;
+    __le32 thm_temp2_trans_count;
+    __le32 thm_temp1_total_time;
+    __le32 thm_temp2_total_time;
+    __u8 rsvd232[280];
+  };
 
-``NVME_NS_FPI_REMAINING``
-  Mask to get the format percent remaining value
+**Members**
 
-``NVME_NS_FPI_SUPPORTED``
-  If set, indicates that the namespace supports the
-  Format Progress Indicator defined for the field.
 
 
 
 
-.. c:type:: enum nvme_id_ns_dlfeat
+.. c:type:: enum 
 
-   This field indicates information about features that affect deallocating logical blocks for this namespace.
 
 **Constants**
 
-``NVME_NS_DLFEAT_RB``
-  Mask to get the value of the read behavior
+``NVME_SMART_CRIT_SPARE``
+  *undescribed*
 
-``NVME_NS_DLFEAT_RB_NR``
-  Read behvaior is not reported
+``NVME_SMART_CRIT_TEMPERATURE``
+  *undescribed*
 
-``NVME_NS_DLFEAT_RB_ALL_0S``
-  A deallocated logical block returns all bytes
-  cleared to 0h.
+``NVME_SMART_CRIT_DEGRADED``
+  *undescribed*
 
-``NVME_NS_DLFEAT_RB_ALL_FS``
-  A deallocated logical block returns all bytes
-  set to FFh.
+``NVME_SMART_CRIT_MEDIA``
+  *undescribed*
 
-``NVME_NS_DLFEAT_WRITE_ZEROES``
-  If set, indicates that the controller supports
-  the Deallocate bit in the Write Zeroes command
-  for this namespace.
+``NVME_SMART_CRIT_VOLATILE_MEMORY``
+  *undescribed*
 
-``NVME_NS_DLFEAT_CRC_GUARD``
-  If set, indicates that the Guard field for
-  deallocated logical blocks that contain
-  protection information is set to the CRC for
-  the value read from the deallocated logical
-  block and its metadata
+``NVME_SMART_CRIT_PMR_RO``
+  *undescribed*
 
 
 
 
-.. c:type:: enum nvme_id_ns_attr
+.. c:type:: enum 
 
-   Specifies attributes of the namespace.
 
 **Constants**
 
-``NVME_NS_NSATTR_WRITE_PROTECTED``
-  If set, then the namespace is currently
-  write protected and all write access to the
-  namespace shall fail.
+``NVME_SMART_EGCW_SPARE``
+  *undescribed*
+
+``NVME_SMART_EGCW_DEGRADED``
+  *undescribed*
 
+``NVME_SMART_EGCW_RO``
+  *undescribed*
 
 
 
-.. c:type:: struct nvme_ns_id_desc
+
+.. c:type:: struct nvme_firmware_slot
 
 
 **Definition**
 
 ::
 
-  struct nvme_ns_id_desc {
-    __u8 nidt;
-    __u8 nidl;
-    __le16 reserved;
-    __u8 nid[];
+  struct nvme_firmware_slot {
+    __u8 afi;
+    __u8 resv[7];
+    char frs[7][8];
+    __u8 resv2[448];
   };
 
 **Members**
 
-``nidt``
-  Namespace Identifier Type, see :c:type:`enum nvme_ns_id_desc_nidt <nvme_ns_id_desc_nidt>`
-
-``nidl``
-  Namespace Identifier Length contains the length in bytes of the
-  :c:type:`struct nvme_id_ns <nvme_id_ns>`.nid.
-
-``nid``
-  Namespace Identifier contains a value that is globally unique and
-  assigned to the namespace when the namespace is created. The length
-  is defined in :c:type:`struct nvme_id_ns <nvme_id_ns>`.nidl.
 
 
 
 
+.. c:type:: struct nvme_cmd_effects_log
 
-.. c:type:: enum nvme_ns_id_desc_nidt
 
-   Known namespace identifier types
+**Definition**
 
-**Constants**
+::
 
-``NVME_NIDT_EUI64``
-  IEEE Extended Unique Identifier, the NID field contains a
-  copy of the EUI64 field in the struct nvme_id_ns.eui64.
+  struct nvme_cmd_effects_log {
+    __le32 acs[256];
+    __le32 iocs[256];
+    __u8 rsvd[2048];
+  };
 
-``NVME_NIDT_NGUID``
-  Namespace Globally Unique Identifier, the NID field
-  contains a copy of the NGUID field in struct nvme_id_ns.nguid.
+**Members**
 
-``NVME_NIDT_UUID``
-  The NID field contains a 128-bit Universally Unique
-  Identifier (UUID) as specified in RFC 4122.
 
 
 
 
-.. c:type:: struct nvme_nvmset_attr
+.. c:type:: enum 
 
-   NVM Set Attributes Entry
 
-**Definition**
+**Constants**
 
-::
+``NVME_CMD_EFFECTS_CSUPP``
+  *undescribed*
 
-  struct nvme_nvmset_attr {
-    __le16 id;
-    __le16 endurance_group_id;
-    __u8 rsvd4[4];
-    __le32 random_4k_read_typical;
-    __le32 opt_write_size;
-    __u8 total_nvmset_cap[16];
-    __u8 unalloc_nvmset_cap[16];
-    __u8 rsvd48[80];
-  };
+``NVME_CMD_EFFECTS_LBCC``
+  *undescribed*
 
-**Members**
+``NVME_CMD_EFFECTS_NCC``
+  *undescribed*
 
-``id``
-  NVM Set Identifier
+``NVME_CMD_EFFECTS_NIC``
+  *undescribed*
 
-``endurance_group_id``
-  Endurance Group Identifier
+``NVME_CMD_EFFECTS_CCC``
+  *undescribed*
 
-``random_4k_read_typical``
-  Random 4 KiB Read Typical indicates the typical
-  time to complete a 4 KiB random read in 100
-  nanosecond units when the NVM Set is in a
-  Predictable Latency Mode Deterministic Window and
-  there is 1 outstanding command per NVM Set.
+``NVME_CMD_EFFECTS_CSE_MASK``
+  *undescribed*
 
+``NVME_CMD_EFFECTS_UUID_SEL``
+  *undescribed*
 
 
 
 
-.. c:type:: struct nvme_id_nvmset_list
+.. c:type:: struct nvme_st_result
 
-    **nid**;
 
 **Definition**
 
 ::
 
-  struct nvme_id_nvmset_list {
-    __u8 nid;
-    __u8 rsvd1[127];
-    struct nvme_nvmset_attr ent[NVME_ID_NVMSET_LIST_MAX];
+  struct nvme_st_result {
+    __u8 dsts;
+    __u8 seg;
+    __u8 vdi;
+    __u8 rsvd;
+    __le64 poh;
+    __le32 nsid;
+    __le64 flba;
+    __u8 sct;
+    __u8 sc;
+    __u8 vs[2];
   };
 
 **Members**
 
-``ent``
-  ;
-
 
 
 
 
-.. c:type:: struct nvme_id_ns_granularity_desc
-
+.. c:type:: enum 
 
-**Definition**
 
-::
+**Constants**
 
-  struct nvme_id_ns_granularity_desc {
-    __le64 namespace_size_granularity;
-    __le64 namespace_capacity_granularity;
-  };
+``NVME_ST_RESULT_NO_ERR``
+  *undescribed*
 
-**Members**
+``NVME_ST_RESULT_ABORTED``
+  *undescribed*
 
+``NVME_ST_RESULT_CLR``
+  *undescribed*
 
+``NVME_ST_RESULT_NS_REMOVED``
+  *undescribed*
 
+``NVME_ST_RESULT_ABORTED_FORMAT``
+  *undescribed*
 
+``NVME_ST_RESULT_FATAL_ERR``
+  *undescribed*
 
-.. c:type:: struct nvme_id_ns_granularity_list
+``NVME_ST_RESULT_UNKNOWN_SEG_FAIL``
+  *undescribed*
 
+``NVME_ST_RESULT_KNOWN_SEG_FAIL``
+  *undescribed*
 
-**Definition**
+``NVME_ST_RESULT_ABORTED_UNKNOWN``
+  *undescribed*
 
-::
+``NVME_ST_RESULT_ABORTED_SANITIZE``
+  *undescribed*
 
-  struct nvme_id_ns_granularity_list {
-    __le32 attributes;
-    __u8 num_descriptors;
-    __u8 rsvd[27];
-    struct nvme_id_ns_granularity_desc entry[NVME_ID_ND_DESCRIPTOR_MAX];
-    __u8 rsvd288[3808];
-  };
+``NVME_ST_RESULT_NOT_USED``
+  *undescribed*
 
-**Members**
+``NVME_ST_RESULT_MASK``
+  *undescribed*
 
 
 
 
+.. c:type:: enum 
 
-.. c:type:: struct nvme_id_uuid_list_entry
 
+**Constants**
 
-**Definition**
+``NVME_ST_CODE_SHIFT``
+  *undescribed*
 
-::
+``NVME_ST_CODE_RESRVED``
+  *undescribed*
 
-  struct nvme_id_uuid_list_entry {
-    __u8 header;
-    __u8 rsvd1[15];
-    __u8 uuid[16];
-  };
+``NVME_ST_CODE_SHORT``
+  *undescribed*
 
-**Members**
+``NVME_ST_CODE_EXTENDED``
+  *undescribed*
 
+``NVME_ST_CODE_VS``
+  *undescribed*
 
 
 
@@ -8643,31 +8592,33 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 **Constants**
 
-``NVME_ID_UUID_HDR_ASSOCIATION_MASK``
+``NVME_ST_VALID_DIAG_INFO_NSID``
   *undescribed*
 
-``NVME_ID_UUID_ASSOCIATION_NONE``
+``NVME_ST_VALID_DIAG_INFO_FLBA``
   *undescribed*
 
-``NVME_ID_UUID_ASSOCIATION_VENDOR``
+``NVME_ST_VALID_DIAG_INFO_SCT``
   *undescribed*
 
-``NVME_ID_UUID_ASSOCIATION_SUBSYSTEM_VENDOR``
+``NVME_ST_VALID_DIAG_INFO_SC``
   *undescribed*
 
 
 
 
-.. c:type:: struct nvme_id_uuid_list
+.. c:type:: struct nvme_self_test_log
 
 
 **Definition**
 
 ::
 
-  struct nvme_id_uuid_list {
-    __u8 rsvd0[32];
-    struct nvme_id_uuid_list_entry entry[NVME_ID_UUID_LIST_MAX];
+  struct nvme_self_test_log {
+    __u8 current_operation;
+    __u8 completion;
+    __u8 rsvd[2];
+    struct nvme_st_result   result[NVME_LOG_ST_MAX_RESULTS];
   };
 
 **Members**
@@ -8676,68 +8627,100 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: struct nvme_ctrl_list
+.. c:type:: struct nvme_telemetry_log
 
-    **num**;
+   Retrieve internal data specific to the manufacturer.
 
 **Definition**
 
 ::
 
-  struct nvme_ctrl_list {
-    __le16 num;
-    __le16 identifier[NVME_ID_CTRL_LIST_MAX];
+  struct nvme_telemetry_log {
+    __u8 lpi;
+    __u8 rsvd1[4];
+    __u8 ieee[3];
+    __le16 dalb1;
+    __le16 dalb2;
+    __le16 dalb3;
+    __u8 rsvd14[368];
+    __u8 ctrlavail;
+    __u8 ctrldgn;
+    __u8 rsnident[128];
+    __u8 data_area[];
   };
 
 **Members**
 
+``lpi``
+  Log Identifier, either ``NVME_LOG_LID_TELEMETRY_HOST`` or
+  ``NVME_LOG_LID_TELEMETRY_CTRL``
 
+``ieee``
+  IEEE OUI Identifier is the Organization Unique Identifier (OUI)
+  for the controller vendor that is able to interpret the data.
 
+``dalb1``
+  Telemetry Controller-Initiated Data Area 1 Last Block is
+  the value of the last block in this area.
 
+``dalb3``
+  Telemetry Controller-Initiated Data Area 1 Last Block is
+  the value of the last block in this area.
 
-.. c:type:: struct nvme_ns_list
+``ctrlavail``
+  Telemetry Controller-Initiated Data Available, if cleared,
+  then the controller telemetry log does not contain saved
+  internal controller state. If this field is set to 1h, the
+  controller log contains saved internal controller state. If
+  this field is set to 1h, the data will be latched until the
+  host releases it by reading the log with RAE cleared.
 
+``ctrldgn``
+  Telemetry Controller-Initiated Data Generation Number is
+  a value that is incremented each time the controller initiates a
+  capture of its internal controller state in the controller .
 
-**Definition**
+``rsnident``
+  Reason Identifieris a vendor specific identifier that describes
+  the operating conditions of the controller at the time of
+  capture.
 
-::
+``data_area``
+  Telemetry data blocks, vendor specific information data.
 
-  struct nvme_ns_list {
-    __le32 ns[NVME_ID_NS_LIST_MAX];
-  };
 
-**Members**
+**Description**
 
+This log consists of a header describing the log and zero or more Telemetry
+Data Blocks. All Telemetry Data Blocks are ``NVME_LOG_TELEM_BLOCK_SIZE``, 512
+bytes, in size. This log captures the controller’s internal state.
 
 
 
 
-.. c:type:: struct nvme_primary_ctrl_cap
+.. c:type:: struct nvme_endurance_group_log
 
 
 **Definition**
 
 ::
 
-  struct nvme_primary_ctrl_cap {
-    __le16 cntlid;
-    __le16 portid;
-    __u8 crt;
-    __u8 rsvd5[27];
-    __le32 vqfrt;
-    __le32 vqrfa;
-    __le16 vqrfap;
-    __le16 vqprt;
-    __le16 vqfrsm;
-    __le16 vqgran;
-    __u8 rsvd48[16];
-    __le32 vifrt;
-    __le32 virfa;
-    __le16 virfap;
-    __le16 viprt;
-    __le16 vifrsm;
-    __le16 vigran;
-    __u8 rsvd80[4016];
+  struct nvme_endurance_group_log {
+    __u8 critical_warning;
+    __u8 rsvd1[2];
+    __u8 avl_spare;
+    __u8 avl_spare_threshold;
+    __u8 percent_used;
+    __u8 rsvd6[26];
+    __u8 endurance_estimate[16];
+    __u8 data_units_read[16];
+    __u8 data_units_written[16];
+    __u8 media_units_written[16];
+    __u8 host_read_cmds[16];
+    __u8 host_write_cmds[16];
+    __u8 media_data_integrity_err[16];
+    __u8 num_err_info_log_entries[16];
+    __u8 rsvd160[352];
   };
 
 **Members**
@@ -8746,42 +8729,33 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: struct nvme_secondary_ctrl
-
+.. c:type:: enum nvme_eg_critical_warning_flags
 
-**Definition**
 
-::
+**Constants**
 
-  struct nvme_secondary_ctrl {
-    __le16 scid;
-    __le16 pcid;
-    __u8 scs;
-    __u8 rsvd5[3];
-    __le16 vfn;
-    __le16 nvq;
-    __le16 nvi;
-    __u8 rsvd14[18];
-  };
+``NVME_EG_CRITICAL_WARNING_SPARE``
+  *undescribed*
 
-**Members**
+``NVME_EG_CRITICAL_WARNING_DEGRADED``
+  *undescribed*
 
+``NVME_EG_CRITICAL_WARNING_READ_ONLY``
+  *undescribed*
 
 
 
 
-.. c:type:: struct nvme_secondary_ctrl_list
+.. c:type:: struct nvme_aggregate_endurance_group_event
 
-    **num**;
 
 **Definition**
 
 ::
 
-  struct nvme_secondary_ctrl_list {
-    __u8 num;
-    __u8 rsvd[31];
-    struct nvme_secondary_ctrl sc_entry[NVME_ID_SECONDARY_CTRL_MAX];
+  struct nvme_aggregate_endurance_group_event {
+    __le64 num_entries;
+    __le16 entries[];
   };
 
 **Members**
@@ -8790,27 +8764,28 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: struct nvme_error_log_page
+.. c:type:: struct nvme_nvmset_predictable_lat_log
 
 
 **Definition**
 
 ::
 
-  struct nvme_error_log_page {
-    __le64 error_count;
-    __le16 sqid;
-    __le16 cmdid;
-    __le16 status_field;
-    __le16 parm_error_location;
-    __le64 lba;
-    __le32 nsid;
-    __u8 vs;
-    __u8 trtype;
-    __u8 rsvd[2];
-    __le64 cs;
-    __le16 trtype_spec_info;
-    __u8 rsvd2[22];
+  struct nvme_nvmset_predictable_lat_log {
+    __u8 status;
+    __u8 rsvd1;
+    __le16 event_type;
+    __u8 rsvd4[28];
+    __le64 dtwin_rt;
+    __le64 dtwin_wt;
+    __le64 dtwin_tmax;
+    __le64 dtwin_tmin_hi;
+    __le64 dtwin_tmin_lo;
+    __u8 rsvd72[56];
+    __le64 dtwin_re;
+    __le64 dtwin_we;
+    __le64 dtwin_te;
+    __u8 rsvd152[360];
   };
 
 **Members**
@@ -8824,48 +8799,73 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 **Constants**
 
-``NVME_ERR_PEL_BYTE_MASK``
+``NVME_NVMSET_PL_STATUS_DISABLED``
   *undescribed*
 
-``NVME_ERR_PEL_BIT_MASK``
+``NVME_NVMSET_PL_STATUS_DTWIN``
+  *undescribed*
+
+``NVME_NVMSET_PL_STATUS_NDWIN``
   *undescribed*
 
 
 
 
-.. c:type:: struct nvme_smart_log
+.. c:type:: enum 
+
+
+**Constants**
+
+``NVME_NVMSET_PL_EVENT_DTWIN_READ_WARN``
+  *undescribed*
+
+``NVME_NVMSET_PL_EVENT_DTWIN_WRITE_WARN``
+  *undescribed*
+
+``NVME_NVMSET_PL_EVENT_DTWIN_TIME_WARN``
+  *undescribed*
+
+``NVME_NVMSET_PL_EVENT_DTWIN_EXCEEDED``
+  *undescribed*
+
+``NVME_NVMSET_PL_EVENT_DTWIN_EXCURSION``
+  *undescribed*
+
+
+
+
+.. c:type:: struct nvme_aggregate_predictable_lat_event
 
 
 **Definition**
 
 ::
 
-  struct nvme_smart_log {
-    __u8 critical_warning;
-    __u8 temperature[2];
-    __u8 avail_spare;
-    __u8 spare_thresh;
-    __u8 percent_used;
-    __u8 endu_grp_crit_warn_sumry;
-    __u8 rsvd7[25];
-    __u8 data_units_read[16];
-    __u8 data_units_written[16];
-    __u8 host_reads[16];
-    __u8 host_writes[16];
-    __u8 ctrl_busy_time[16];
-    __u8 power_cycles[16];
-    __u8 power_on_hours[16];
-    __u8 unsafe_shutdowns[16];
-    __u8 media_errors[16];
-    __u8 num_err_log_entries[16];
-    __le32 warning_temp_time;
-    __le32 critical_comp_time;
-    __le16 temp_sensor[8];
-    __le32 thm_temp1_trans_count;
-    __le32 thm_temp2_trans_count;
-    __le32 thm_temp1_total_time;
-    __le32 thm_temp2_total_time;
-    __u8 rsvd232[280];
+  struct nvme_aggregate_predictable_lat_event {
+    __le64 num_entries;
+    __le16 entries[];
+  };
+
+**Members**
+
+
+
+
+
+.. c:type:: struct nvme_ana_group_desc
+
+
+**Definition**
+
+::
+
+  struct nvme_ana_group_desc {
+    __le32 grpid;
+    __le32 nnsids;
+    __le64 chgcnt;
+    __u8 state;
+    __u8 rsvd17[15];
+    __le32 nsids[];
   };
 
 **Members**
@@ -8874,58 +8874,73 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: enum 
+.. c:type:: enum nvme_ana_state
 
 
 **Constants**
 
-``NVME_SMART_CRIT_SPARE``
+``NVME_ANA_STATE_OPTIMIZED``
   *undescribed*
 
-``NVME_SMART_CRIT_TEMPERATURE``
+``NVME_ANA_STATE_NONOPTIMIZED``
   *undescribed*
 
-``NVME_SMART_CRIT_DEGRADED``
+``NVME_ANA_STATE_INACCESSIBLE``
   *undescribed*
 
-``NVME_SMART_CRIT_MEDIA``
+``NVME_ANA_STATE_PERSISTENT_LOSS``
   *undescribed*
 
-``NVME_SMART_CRIT_VOLATILE_MEMORY``
+``NVME_ANA_STATE_CHANGE``
   *undescribed*
 
-``NVME_SMART_CRIT_PMR_RO``
-  *undescribed*
 
 
 
+.. c:type:: struct nvme_ana_log
 
-.. c:type:: enum 
 
+**Definition**
 
-**Constants**
+::
 
-``NVME_SMART_EGCW_SPARE``
-  *undescribed*
+  struct nvme_ana_log {
+    __le64 chgcnt;
+    __le16 ngrps;
+    __u8 rsvd10[6];
+    struct nvme_ana_group_desc descs[];
+  };
 
-``NVME_SMART_EGCW_DEGRADED``
-  *undescribed*
+**Members**
 
-``NVME_SMART_EGCW_RO``
-  *undescribed*
 
 
 
 
-.. c:type:: struct nvme_frs
+.. c:type:: struct nvme_persistent_event_log
 
 
 **Definition**
 
 ::
 
-  struct nvme_frs {
-    char frs[8];
+  struct nvme_persistent_event_log {
+    __u8 lid;
+    __u8 rsvd1[3];
+    __le32 ttl;
+    __u8 rv;
+    __u8 rsvd17;
+    __le16 lht;
+    __le64 ts;
+    __u8 poh[16];
+    __le64 pcc;
+    __le16 vid;
+    __le16 ssvid;
+    char sn[20];
+    char mn[40];
+    char subnqn[NVME_NQN_LENGTH];
+    __u8 rsvd372;
+    __u8 seb[32];
   };
 
 **Members**
@@ -8934,18 +8949,17 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: struct nvme_firmware_slot
+.. c:type:: struct nvme_lba_rd
 
 
 **Definition**
 
 ::
 
-  struct nvme_firmware_slot {
-    __u8 afi;
-    __u8 rsvd[7];
-    struct nvme_frs frs[7];
-    __u8 rsvd2[448];
+  struct nvme_lba_rd {
+    __le64 rslba;
+    __le32 rnlb;
+    __u8 rsvd12[4];
   };
 
 **Members**
@@ -8954,17 +8968,19 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: struct nvme_cmd_effects_log
+.. c:type:: struct nvme_lbas_ns_element
 
 
 **Definition**
 
 ::
 
-  struct nvme_cmd_effects_log {
-    __le32 acs[256];
-    __le32 iocs[256];
-    __u8 rsvd[2048];
+  struct nvme_lbas_ns_element {
+    __le32 neid;
+    __le32 nrld;
+    __u8 ratype;
+    __u8 rsvd8[7];
+    struct nvme_lba_rd lba_rd[];
   };
 
 **Members**
@@ -8973,53 +8989,52 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: enum 
+.. c:type:: enum nvme_lba_status_atype
 
 
 **Constants**
 
-``NVME_CMD_EFFECTS_CSUPP``
+``NVME_LBA_STATUS_ATYPE_SCAN_UNTRACKED``
   *undescribed*
 
-``NVME_CMD_EFFECTS_LBCC``
+``NVME_LBA_STATUS_ATYPE_SCAN_TRACKED``
   *undescribed*
 
-``NVME_CMD_EFFECTS_NCC``
-  *undescribed*
 
-``NVME_CMD_EFFECTS_NIC``
-  *undescribed*
 
-``NVME_CMD_EFFECTS_CCC``
-  *undescribed*
 
-``NVME_CMD_EFFECTS_CSE_MASK``
-  *undescribed*
+.. c:type:: struct nvme_lba_status_log
 
-``NVME_CMD_EFFECTS_UUID_SEL``
-  *undescribed*
 
+**Definition**
+
+::
+
+  struct nvme_lba_status_log {
+    __le32 lslplen;
+    __le32 nlslne;
+    __le32 estulb;
+    __u8 rsvd12[2];
+    __le16 lsgc;
+    struct nvme_lbas_ns_element elements[];
+  };
+
+**Members**
 
 
 
-.. c:type:: struct nvme_st_result
+
+
+.. c:type:: struct nvme_eg_event_aggregate_log
 
 
 **Definition**
 
 ::
 
-  struct nvme_st_result {
-    __u8 dsts;
-    __u8 seg;
-    __u8 vdi;
-    __u8 rsvd;
-    __le64 poh;
-    __le32 nsid;
-    __le64 flba;
-    __u8 sct;
-    __u8 sc;
-    __u8 vs[2];
+  struct nvme_eg_event_aggregate_log {
+    __le64 nr_entries;
+    __le16 egids[];
   };
 
 **Members**
@@ -9028,236 +9043,205 @@ Returns true if given offset is 64bit register, otherwise it returns false.
 
 
 
-.. c:type:: enum 
+.. c:type:: struct nvme_resv_notification_log
 
 
-**Constants**
+**Definition**
 
-``NVME_ST_RESULT_NO_ERR``
-  *undescribed*
+::
 
-``NVME_ST_RESULT_ABORTED``
-  *undescribed*
+  struct nvme_resv_notification_log {
+    __le64 lpc;
+    __u8 rnlpt;
+    __u8 nalp;
+    __u8 rsvd9[2];
+    __le32 nsid;
+    __u8 rsvd16[48];
+  };
 
-``NVME_ST_RESULT_CLR``
-  *undescribed*
+**Members**
 
-``NVME_ST_RESULT_NS_REMOVED``
-  *undescribed*
+``rnlpt``
+  See :c:type:`enum nvme_resv_notify_rnlpt <nvme_resv_notify_rnlpt>`.
 
-``NVME_ST_RESULT_ABORTED_FORMAT``
-  *undescribed*
 
-``NVME_ST_RESULT_FATAL_ERR``
-  *undescribed*
 
-``NVME_ST_RESULT_UNKNOWN_SEG_FAIL``
-  *undescribed*
 
-``NVME_ST_RESULT_KNOWN_SEG_FAIL``
+
+.. c:type:: enum nvme_resv_notify_rnlpt
+
+
+**Constants**
+
+``NVME_RESV_NOTIFY_RNLPT_EMPTY``
   *undescribed*
 
-``NVME_ST_RESULT_ABORTED_UNKNOWN``
+``NVME_RESV_NOTIFY_RNLPT_REGISTRATION_PREEMPTED``
   *undescribed*
 
-``NVME_ST_RESULT_ABORTED_SANITIZE``
+``NVME_RESV_NOTIFY_RNLPT_RESERVATION_RELEASED``
   *undescribed*
 
-``NVME_ST_RESULT_NOT_USED``
+``NVME_RESV_NOTIFY_RNLPT_RESERVATION_PREEMPTED``
   *undescribed*
 
 
 
 
-.. c:type:: enum 
+.. c:type:: struct nvme_sanitize_log_page
 
 
-**Constants**
+**Definition**
 
-``NVME_ST_OPERATION_NONE``
-  *undescribed*
+::
 
-``NVME_ST_OPERATION_SHORT``
-  *undescribed*
+  struct nvme_sanitize_log_page {
+    __le16 sprog;
+    __le16 sstat;
+    __le32 scdw10;
+    __le32 eto;
+    __le32 etbe;
+    __le32 etce;
+    __le32 etond;
+    __le32 etbend;
+    __le32 etcend;
+    __u8 rsvd32[480];
+  };
 
-``NVME_ST_OPERATION_EXTENDED``
-  *undescribed*
+**Members**
 
-``NVME_ST_OPERATION_VS``
-  *undescribed*
 
 
 
 
-.. c:type:: enum 
+.. c:type:: enum nvme_sanitize_sstat
 
 
 **Constants**
 
-``NVME_ST_VALID_DIAG_INFO_NSID``
+``NVME_SANITIZE_SSTAT_STATUS_MASK``
   *undescribed*
 
-``NVME_ST_VALID_DIAG_INFO_FLBA``
+``NVME_SANITIZE_SSTAT_STATUS_NEVER_SANITIZED``
   *undescribed*
 
-``NVME_ST_VALID_DIAG_INFO_SCT``
+``NVME_SANITIZE_SSTAT_STATUS_COMPLETE_SUCCESS``
   *undescribed*
 
-``NVME_ST_VALID_DIAG_INFO_SC``
+``NVME_SANITIZE_SSTAT_STATUS_IN_PROGESS``
   *undescribed*
 
+``NVME_SANITIZE_SSTAT_STATUS_COMPLETED_FAILED``
+  *undescribed*
 
+``NVME_SANITIZE_SSTAT_STATUS_ND_COMPLETE_SUCCESS``
+  *undescribed*
 
+``NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK``
+  *undescribed*
 
-.. c:type:: struct nvme_self_test_log
-
-
-**Definition**
-
-::
-
-  struct nvme_self_test_log {
-    __u8 current_operation;
-    __u8 completion;
-    __u8 rsvd[2];
-    struct nvme_st_result   result[NVME_LOG_ST_MAX_RESULTS];
-  };
-
-**Members**
+``NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT``
+  *undescribed*
 
+``NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED``
+  *undescribed*
 
 
 
 
-.. c:type:: struct nvme_telemetry_log
+.. c:type:: struct nvme_lba_status_desc
 
-   Retrieve internal data specific to the manufacturer.
 
 **Definition**
 
 ::
 
-  struct nvme_telemetry_log {
-    __u8 lpi;
-    __u8 rsvd[4];
-    __u8 ieee[3];
-    __le16 dalb1;
-    __le16 dalb2;
-    __le16 dalb3;
-    __u8 rsvd1[368];
-    __u8 ctrlavail;
-    __u8 ctrldgn;
-    __u8 rsnident[128];
-    __u8 data_area[];
+  struct nvme_lba_status_desc {
+    __le64 dslba;
+    __le32 nlb;
+    __u8 rsvd12;
+    __u8 status;
+    __u8 rsvd14[2];
   };
 
 **Members**
 
-``lpi``
-  Log Identifier, either #NVME_LOG_LID_TELEMETRY_HOST or
-  #NVME_LOG_LID_TELEMETRY_CTRL
 
-``ieee``
-  IEEE OUI Identifier is the Organization Unique Identifier (OUI)
-  for the controller vendor that is able to interpret the data.
 
-``dalb1``
-  Telemetry Controller-Initiated Data Area 1 Last Block is
-  the value of the last block in this area.
 
-``dalb3``
-  Telemetry Controller-Initiated Data Area 1 Last Block is
-  the value of the last block in this area.
 
-``ctrlavail``
-  Telemetry Controller-Initiated Data Available, if cleared,
-  then the controller telemetry log does not contain saved
-  internal controller state. If this field is set to 1h, the
-  controller log contains saved internal controller state. If
-  this field is set to 1h, the data will be latched until the
-  host releases it by reading the log with RAE cleared.
+.. c:type:: struct nvme_lba_status
 
-``ctrldgn``
-  Telemetry Controller-Initiated Data Generation Number is
-  a value that is incremented each time the controller initiates a
-  capture of its internal controller state in the controller .
 
-``rsnident``
-  Reason Identifieris a vendor specific identifier that describes
-  the operating conditions of the controller at the time of
-  capture.
+**Definition**
 
-``data_area``
-  Telemetry data blocks, vendor specific information data.
+::
 
+  struct nvme_lba_status {
+    __le32 nlsd;
+    __u8 cmpc;
+    __u8 rsvd5[3];
+    struct nvme_lba_status_desc descs[];
+  };
 
-**Description**
+**Members**
 
-This log consists of a header describing the log and zero or more Telemetry
-Data Blocks. All Telemetry Data Blocks are ``NVME_LOG_TELEM_BLOCK_SIZE``, 512
-bytes, in size. This log captures the controller’s internal state.
 
 
 
 
-.. c:type:: struct nvme_endurance_group_log
+.. c:type:: struct nvme_feat_auto_pst
 
 
 **Definition**
 
 ::
 
-  struct nvme_endurance_group_log {
-    __u8 critical_warning;
-    __u8 rsvd1[2];
-    __u8 avl_spare;
-    __u8 avl_spare_threshold;
-    __u8 percent_used;
-    __u8 rsvd6[26];
-    __u8 endurance_estimate[16];
-    __u8 data_units_read[16];
-    __u8 data_units_written[16];
-    __u8 media_units_written[16];
-    __u8 host_read_cmds[16];
-    __u8 host_write_cmds[16];
-    __u8 media_data_integrity_err[16];
-    __u8 num_err_info_log_entries[16];
-    __u8 rsvd160[352];
+  struct nvme_feat_auto_pst {
+    __le64 apst_entry[32];
   };
 
 **Members**
 
+``apst_entry``
+  See :c:type:`enum nvme_apst_entry <nvme_apst_entry>`
 
 
 
 
-.. c:type:: enum nvme_eg_critical_warning_flags
+
+.. c:type:: enum nvme_apst_entry
 
 
 **Constants**
 
-``NVME_EG_CRITICAL_WARNING_SPARE``
+``NVME_APST_ENTRY_ITPS_MASK``
   *undescribed*
 
-``NVME_EG_CRITICAL_WARNING_DEGRADED``
+``NVME_APST_ENTRY_ITPS_SHIFT``
   *undescribed*
 
-``NVME_EG_CRITICAL_WARNING_READ_ONLY``
+``NVME_APST_ENTRY_ITPT_MASK``
   *undescribed*
 
+``NVME_APST_ENTRY_ITPT_SHIFT``
+  *undescribed*
 
 
 
-.. c:type:: struct nvme_aggregate_endurance_group_event
 
+.. c:type:: struct nvme_timestamp
+
+    timestamp:
 
 **Definition**
 
 ::
 
-  struct nvme_aggregate_endurance_group_event {
-    __le64 num_entries;
-    __le16 entries[];
+  struct nvme_timestamp {
+    __u8 timestamp[6];
+    __u8 attr;
+    __u8 rsvd;
   };
 
 **Members**
@@ -9266,28 +9250,21 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_nvmset_predictable_lat_log
+.. c:type:: struct nvme_lba_range_type_entry
 
 
 **Definition**
 
 ::
 
-  struct nvme_nvmset_predictable_lat_log {
-    __u8 status;
-    __u8 rsvd1;
-    __le16 event_type;
-    __u8 rsvd4[28];
-    __le64 dtwin_rt;
-    __le64 dtwin_wt;
-    __le64 dtwin_tmax;
-    __le64 dtwin_tmin_hi;
-    __le64 dtwin_tmin_lo;
-    __u8 rsvd72[56];
-    __le64 dtwin_re;
-    __le64 dtwin_we;
-    __le64 dtwin_te;
-    __u8 rsvd152[360];
+  struct nvme_lba_range_type_entry {
+    __u8 type;
+    __u8 attributes;
+    __u8 rsvd2[14];
+    __u64 slba;
+    __u64 nlb;
+    __u8 guid[16];
+    __u8 rsvd48[16];
   };
 
 **Members**
@@ -9301,51 +9278,62 @@ bytes, in size. This log captures the controller’s internal state.
 
 **Constants**
 
-``NVME_NVMSET_PL_STATUS_DISABLED``
+``NVME_LBART_TYPE_GP``
   *undescribed*
 
-``NVME_NVMSET_PL_STATUS_DTWIN``
+``NVME_LBART_TYPE_FS``
   *undescribed*
 
-``NVME_NVMSET_PL_STATUS_NDWIN``
+``NVME_LBART_TYPE_RAID``
   *undescribed*
 
+``NVME_LBART_TYPE_CACHE``
+  *undescribed*
 
+``NVME_LBART_TYPE_SWAP``
+  *undescribed*
 
+``NVME_LBART_ATTRIB_TEMP``
+  *undescribed*
 
-.. c:type:: enum 
+``NVME_LBART_ATTRIB_HIDE``
+  *undescribed*
 
 
-**Constants**
 
-``NVME_NVMSET_PL_EVENT_DTWIN_READ_WARN``
-  *undescribed*
 
-``NVME_NVMSET_PL_EVENT_DTWIN_WRITE_WARN``
-  *undescribed*
+.. c:type:: struct nvme_lba_range_type
 
-``NVME_NVMSET_PL_EVENT_DTWIN_TIME_WARN``
-  *undescribed*
 
-``NVME_NVMSET_PL_EVENT_DTWIN_EXCEEDED``
-  *undescribed*
+**Definition**
 
-``NVME_NVMSET_PL_EVENT_DTWIN_EXCURSION``
-  *undescribed*
+::
+
+  struct nvme_lba_range_type {
+    struct nvme_lba_range_type_entry entry[NVME_FEAT_LBA_RANGE_MAX];
+  };
 
+**Members**
 
 
 
-.. c:type:: struct nvme_aggregate_predictable_lat_event
 
 
+.. c:type:: struct nvme_plm_config
+
+    **ee**; **dtwinrt**; **dtwinwt**; **dtwintt**;
+
 **Definition**
 
 ::
 
-  struct nvme_aggregate_predictable_lat_event {
-    __le64 num_entries;
-    __le16 entries[];
+  struct nvme_plm_config {
+    __le16 ee;
+    __u8 rsvd2[30];
+    __le64 dtwinrt;
+    __le64 dtwinwt;
+    __le64 dtwintt;
+    __u8 rsvd56[456];
   };
 
 **Members**
@@ -9354,20 +9342,16 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_ana_group_desc
+.. c:type:: struct nvme_feat_host_behavior
 
 
 **Definition**
 
 ::
 
-  struct nvme_ana_group_desc {
-    __le32 grpid;
-    __le32 nnsids;
-    __le64 chgcnt;
-    __u8 state;
-    __u8 rsvd17[15];
-    __le32 nsids[];
+  struct nvme_feat_host_behavior {
+    __u8 acre;
+    __u8 rsvd1[511];
   };
 
 **Members**
@@ -9381,36 +9365,44 @@ bytes, in size. This log captures the controller’s internal state.
 
 **Constants**
 
-``NVME_ANA_STATE_OPTIMIZED``
+``NVME_ENABLE_ACRE``
   *undescribed*
 
-``NVME_ANA_STATE_NONOPTIMIZED``
-  *undescribed*
 
-``NVME_ANA_STATE_INACCESSIBLE``
-  *undescribed*
 
-``NVME_ANA_STATE_PERSISTENT_LOSS``
-  *undescribed*
 
-``NVME_ANA_STATE_CHANGE``
-  *undescribed*
+.. c:type:: struct nvme_dsm_range
 
 
+**Definition**
 
+::
+
+  struct nvme_dsm_range {
+    __le32 cattr;
+    __le32 nlb;
+    __le64 slba;
+  };
+
+**Members**
 
-.. c:type:: struct nvme_ana_log
+
+
+
+
+.. c:type:: struct nvme_registered_ctrl
 
 
 **Definition**
 
 ::
 
-  struct nvme_ana_log {
-    __le64 chgcnt;
-    __le16 ngrps;
-    __u8 rsvd10[6];
-    struct nvme_ana_group_desc descs[];
+  struct nvme_registered_ctrl {
+    __le16 cntlid;
+    __u8 rcsts;
+    __u8 rsvd3[5];
+    __le64 hostid;
+    __le64 rkey;
   };
 
 **Members**
@@ -9419,30 +9411,82 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_persistent_event_log
+.. c:type:: struct nvme_registered_ctrl_ext
 
 
 **Definition**
 
 ::
 
-  struct nvme_persistent_event_log {
-    __u8 lid;
-    __u8 rsvd1[3];
-    __le32 ttl;
-    __u8 rv;
-    __u8 rsvd17;
-    __le16 lht;
-    __le64 ts;
-    __u8 poh[16];
-    __le64 pcc;
-    __le16 vid;
-    __le16 ssvid;
-    char sn[20];
-    char mn[40];
-    char subnqn[NVME_NQN_LENGTH];
-    __u8 rsvd372;
-    __u8 seb[32];
+  struct nvme_registered_ctrl_ext {
+    __le16 cntlid;
+    __u8 rcsts;
+    __u8 rsvd3[5];
+    __le64 rkey;
+    __u8 hostid[16];
+    __u8 rsvd32[32];
+  };
+
+**Members**
+
+
+
+
+
+.. c:type:: struct nvme_reservation_status
+
+   {
+
+**Definition**
+
+::
+
+  struct nvme_reservation_status {
+    __le32 gen;
+    __u8 rtype;
+    __u8 regctl[2];
+    __u8 rsvd7[2];
+    __u8 ptpls;
+    __u8 rsvd10[14];
+    union {
+      struct {
+        __u8 rsvd24[40];
+        struct nvme_registered_ctrl_ext regctl_eds[0];
+      };
+      struct nvme_registered_ctrl regctl_ds[0];
+    };
+  };
+
+**Members**
+
+``{unnamed_union}``
+  anonymous
+
+``{unnamed_struct}``
+  anonymous
+
+
+
+
+
+.. c:type:: struct nvme_streams_directive_params
+
+
+**Definition**
+
+::
+
+  struct nvme_streams_directive_params {
+    __le16 msl;
+    __le16 nssa;
+    __le16 nsso;
+    __u8 nssc;
+    __u8 rsvd[9];
+    __le32 sws;
+    __le16 sgs;
+    __le16 nsa;
+    __le16 nso;
+    __u8 rsvd2[6];
   };
 
 **Members**
@@ -9451,17 +9495,16 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_lba_rd
+.. c:type:: struct nvme_streams_directive_status
 
 
 **Definition**
 
 ::
 
-  struct nvme_lba_rd {
-    __le64 rslba;
-    __le32 rnlb;
-    __u8 rsvd12[4];
+  struct nvme_streams_directive_status {
+    __le16 osc;
+    __le16 sid[];
   };
 
 **Members**
@@ -9470,19 +9513,17 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_lbas_ns_element
+.. c:type:: struct nvme_id_directives
 
 
 **Definition**
 
 ::
 
-  struct nvme_lbas_ns_element {
-    __le32 neid;
-    __le32 nrld;
-    __u8 ratype;
-    __u8 rsvd8[7];
-    struct nvme_lba_rd lba_rd[];
+  struct nvme_id_directives {
+    __u8 supported[32];
+    __u8 enabled[32];
+    __u8 rsvd64[4032];
   };
 
 **Members**
@@ -9491,34 +9532,31 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: enum nvme_lba_status_atype
+.. c:type:: enum 
 
 
 **Constants**
 
-``NVME_LBA_STATUS_ATYPE_SCAN_UNTRACKED``
+``NVME_ID_DIR_ID_BIT``
   *undescribed*
 
-``NVME_LBA_STATUS_ATYPE_SCAN_TRACKED``
+``NVME_ID_DIR_SD_BIT``
   *undescribed*
 
 
 
 
-.. c:type:: struct nvme_lba_status_log
+.. c:type:: struct nvme_host_mem_buf_desc
 
 
 **Definition**
 
 ::
 
-  struct nvme_lba_status_log {
-    __le32 lslplen;
-    __le32 nlslne;
-    __le32 estulb;
-    __u8 rsvd12[2];
-    __le16 lsgc;
-    struct nvme_lbas_ns_element elements[];
+  struct nvme_host_mem_buf_desc {
+    __le64 addr;
+    __le32 size;
+    __u32 rsvd;
   };
 
 **Members**
@@ -9527,128 +9565,170 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_eg_event_aggregate_log
+.. c:type:: enum nvme_ae_type
 
 
-**Definition**
+**Constants**
 
-::
+``NVME_AER_ERROR``
+  *undescribed*
 
-  struct nvme_eg_event_aggregate_log {
-    __le64 nr_entries;
-    __le16 egids[];
-  };
+``NVME_AER_SMART``
+  *undescribed*
 
-**Members**
+``NVME_AER_NOTICE``
+  *undescribed*
 
+``NVME_AER_CSS``
+  *undescribed*
 
+``NVME_AER_VS``
+  *undescribed*
 
 
 
-.. c:type:: struct nvme_resv_notification_log
 
+.. c:type:: enum nvme_ae_info_error
 
-**Definition**
 
-::
+**Constants**
 
-  struct nvme_resv_notification_log {
-    __le64 lpc;
-    __u8 rnlpt;
-    __u8 nalp;
-    __u8 rsvd9[2];
-    __le32 nsid;
-    __u8 rsvd16[48];
-  };
+``NVME_AER_ERROR_INVALID_DB_REG``
+  *undescribed*
 
-**Members**
+``NVME_AER_ERROR_INVALID_DB_VAL``
+  *undescribed*
+
+``NVME_AER_ERROR_DIAG_FAILURE``
+  *undescribed*
 
+``NVME_AER_ERROR_PERSISTENT_INTERNAL_ERROR``
+  *undescribed*
 
+``NVME_AER_ERROR_TRANSIENT_INTERNAL_ERROR``
+  *undescribed*
 
+``NVME_AER_ERROR_FW_IMAGE_LOAD_ERROR``
+  *undescribed*
 
 
-.. c:type:: enum 
+
+
+.. c:type:: enum nvme_ae_info_smart
 
 
 **Constants**
 
-``NVME_RESV_NOTIFY_RNLPT_EMPTY``
+``NVME_AER_SMART_SUBSYSTEM_RELIABILITY``
   *undescribed*
 
-``NVME_RESV_NOTIFY_RNLPT_REGISTRATION_PREEMPTED``
+``NVME_AER_SMART_TEMPERATURE_THRESHOLD``
   *undescribed*
 
-``NVME_RESV_NOTIFY_RNLPT_RESERVATION_RELEASED``
+``NVME_AER_SMART_SPARE_THRESHOLD``
   *undescribed*
 
-``NVME_RESV_NOTIFY_RNLPT_RESERVATION_PREEMPTED``
-  *undescribed*
 
 
 
+.. c:type:: enum nvme_ae_info_css_nvm
 
-.. c:type:: struct nvme_sanitize_log_page
 
+**Constants**
 
-**Definition**
+``NVME_AER_CSS_NVM_RESERVATION``
+  *undescribed*
 
-::
+``NVME_AER_CSS_NVM_SANITIZE_COMPLETED``
+  *undescribed*
+
+``NVME_AER_CSS_NVM_UNEXPECTED_SANITIZE_DEALLOC``
+  *undescribed*
 
-  struct nvme_sanitize_log_page {
-    __le16 sprog;
-    __le16 sstat;
-    __le32 scdw10;
-    __le32 eto;
-    __le32 etbe;
-    __le32 etce;
-    __le32 etond;
-    __le32 etbend;
-    __le32 etcend;
-    __u8 rsvd32[480];
-  };
 
-**Members**
 
 
+.. c:type:: enum nvme_ae_info_notice
 
 
+**Constants**
 
-.. c:type:: enum 
+``NVME_AER_NOTICE_NS_CHANGED``
+  *undescribed*
 
+``NVME_AER_NOTICE_FW_ACT_STARTING``
+  *undescribed*
 
-**Constants**
+``NVME_AER_NOTICE_TELEMETRY``
+  *undescribed*
 
-``NVME_SANITIZE_SSTAT_NEVER_SANITIZED``
+``NVME_AER_NOTICE_ANA``
   *undescribed*
 
-``NVME_SANITIZE_SSTAT_COMPLETE_SUCCESS``
+``NVME_AER_NOTICE_PL_EVENT``
   *undescribed*
 
-``NVME_SANITIZE_SSTAT_IN_PROGESS``
+``NVME_AER_NOTICE_LBA_STATUS_ALERT``
   *undescribed*
 
-``NVME_SANITIZE_SSTAT_COMPLETED_FAILED``
+``NVME_AER_NOTICE_EG_EVENT``
   *undescribed*
 
-``NVME_SANITIZE_SSTAT_ND_COMPLETE_SUCCESS``
+``NVME_AER_NOTICE_DISC_CHANGED``
   *undescribed*
 
 
 
 
-.. c:type:: struct nvme_lba_status_desc
+.. c:type:: enum nvme_subsys_type
+
+
+**Constants**
+
+``NVME_NQN_DISC``
+  Discovery type target subsystem
+
+``NVME_NQN_NVME``
+  NVME type target subsystem
+
+
 
 
+.. c:type:: struct nvmf_disc_log_entry
+
+   Discovery log page entry
+
 **Definition**
 
 ::
 
-  struct nvme_lba_status_desc {
-    __le64 dslba;
-    __le32 nlb;
-    __u8 rsvd12;
-    __u8 status;
-    __u8 rsvd14[2];
+  struct nvmf_disc_log_entry {
+    __u8 trtype;
+    __u8 adrfam;
+    __u8 subtype;
+    __u8 treq;
+    __le16 portid;
+    __le16 cntlid;
+    __le16 asqsz;
+    __u8 rsvd10[22];
+    char trsvcid[NVMF_TRSVCID_SIZE];
+    __u8 rsvd64[192];
+    char subnqn[NVME_NQN_LENGTH];
+    char traddr[NVMF_TRADDR_SIZE];
+    union tsas {
+      char common[NVMF_TSAS_SIZE];
+      struct rdma {
+        __u8 qptype;
+        __u8 prtype;
+        __u8 cms;
+        __u8 rsvd3[5];
+        __u16 pkey;
+        __u8 rsvd10[246];
+      } rdma;
+      struct tcp {
+        __u8 sectype;
+      } tcp;
+    } tsas;
   };
 
 **Members**
@@ -9657,147 +9737,156 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_lba_status
+.. c:type:: enum 
 
+   Transport Type codes for Discovery Log Page entry TRTYPE field
 
-**Definition**
+**Constants**
 
-::
+``NVMF_TRTYPE_UNSPECIFIED``
+  Not indicated
 
-  struct nvme_lba_status {
-    __le32 nlsd;
-    __u8 cmpc;
-    __u8 rsvd5[3];
-    struct nvme_lba_status_desc descs[];
-  };
+``NVMF_TRTYPE_RDMA``
+  RDMA
 
-**Members**
+``NVMF_TRTYPE_FC``
+  Fibre Channel
 
+``NVMF_TRTYPE_TCP``
+  TCP
 
+``NVMF_TRTYPE_LOOP``
+  Reserved for host usage
 
+``NVMF_TRTYPE_MAX``
+  *undescribed*
 
 
-.. c:type:: struct nvme_feat_auto_pst
 
 
-**Definition**
+.. c:type:: enum 
 
-::
+   Address Family codes for Discovery Log Page entry ADRFAM field
 
-  struct nvme_feat_auto_pst {
-    __le64 apst_entry[32];
-  };
+**Constants**
 
-**Members**
+``NVMF_ADDR_FAMILY_PCI``
+  PCIe
+
+``NVMF_ADDR_FAMILY_IP4``
+  IPv4
 
+``NVMF_ADDR_FAMILY_IP6``
+  IPv6
 
+``NVMF_ADDR_FAMILY_IB``
+  InfiniBand
 
+``NVMF_ADDR_FAMILY_FC``
+  Fibre Channel
 
 
-.. c:type:: struct nvme_timestamp
 
-    timestamp:
 
-**Definition**
+.. c:type:: enum 
 
-::
+   Transport Requirements codes for Discovery Log Page entry TREQ field
 
-  struct nvme_timestamp {
-    __u8 timestamp[6];
-    __u8 attr;
-    __u8 rsvd;
-  };
+**Constants**
 
-**Members**
+``NVMF_TREQ_NOT_SPECIFIED``
+  Not specified
 
+``NVMF_TREQ_REQUIRED``
+  Required
 
+``NVMF_TREQ_NOT_REQUIRED``
+  Not Required
 
+``NVMF_TREQ_DISABLE_SQFLOW``
+  SQ flow control disable supported
 
 
-.. c:type:: struct nvme_lba_range_type_entry
 
 
-**Definition**
+.. c:type:: enum 
 
-::
+   RDMA QP Service Type codes for Discovery Log Page entry TSAS RDMA_QPTYPE field
 
-  struct nvme_lba_range_type_entry {
-    __u8 type;
-    __u8 attributes;
-    __u8 rsvd2[14];
-    __u64 slba;
-    __u64 nlb;
-    __u8 guid[16];
-    __u8 rsvd48[16];
-  };
+**Constants**
 
-**Members**
+``NVMF_RDMA_QPTYPE_CONNECTED``
+  Reliable Connected
 
+``NVMF_RDMA_QPTYPE_DATAGRAM``
+  Reliable Datagram
 
 
 
 
 .. c:type:: enum 
 
+   RDMA Provider Type codes for Discovery Log Page entry TSAS RDMA_PRTYPE field
 
 **Constants**
 
-``NVME_LBART_TYPE_GP``
-  *undescribed*
+``NVMF_RDMA_PRTYPE_NOT_SPECIFIED``
+  No Provider Specified
 
-``NVME_LBART_TYPE_FS``
-  *undescribed*
+``NVMF_RDMA_PRTYPE_IB``
+  InfiniBand
 
-``NVME_LBART_TYPE_RAID``
-  *undescribed*
+``NVMF_RDMA_PRTYPE_ROCE``
+  InfiniBand RoCE
 
-``NVME_LBART_TYPE_CACHE``
-  *undescribed*
+``NVMF_RDMA_PRTYPE_ROCEV2``
+  InfiniBand RoCEV2
 
-``NVME_LBART_TYPE_SWAP``
-  *undescribed*
+``NVMF_RDMA_PRTYPE_IWARP``
+  iWARP
 
-``NVME_LBART_ATTRIB_TEMP``
-  *undescribed*
 
-``NVME_LBART_ATTRIB_HIDE``
-  *undescribed*
 
 
+.. c:type:: enum 
 
+   RDMA Connection Management Service Type codes for Discovery Log Page entry TSAS RDMA_CMS field
 
-.. c:type:: struct nvme_lba_range_type
+**Constants**
 
+``NVMF_RDMA_CMS_RDMA_CM``
+  Sockets based endpoint addressing
 
-**Definition**
 
-::
 
-  struct nvme_lba_range_type {
-    struct nvme_lba_range_type_entry entry[NVME_FEAT_LBA_RANGE_MAX];
-  };
 
-**Members**
+.. c:type:: enum 
 
 
+**Constants**
 
+``NVMF_TCP_SECTYPE_NONE``
+  No Security
 
+``NVMF_TCP_SECTYPE_TLS``
+  Transport Layer Security
 
-.. c:type:: struct nvme_plm_config
 
-    **ee**; **dtwinrt**; **dtwinwt**; **dtwintt**;
+
+
+.. c:type:: struct nvmf_discovery_log
+
 
 **Definition**
 
 ::
 
-  struct nvme_plm_config {
-    __le16 ee;
-    __u8 rsvd2[30];
-    __le64 dtwinrt;
-    __le64 dtwinwt;
-    __le64 dtwintt;
-    __u8 rsvd56[456];
+  struct nvmf_discovery_log {
+    __le64 genctr;
+    __le64 numrec;
+    __le16 recfmt;
+    __u8 rsvd14[1006];
+    struct nvmf_disc_log_entry entries[];
   };
 
 **Members**
@@ -9806,46 +9895,44 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_feat_host_behavior
+.. c:type:: struct nvmf_connect_data
 
 
 **Definition**
 
 ::
 
-  struct nvme_feat_host_behavior {
-    __u8 acre;
-    __u8 rsvd1[511];
+  struct nvmf_connect_data {
+    __u8 hostid[16];
+    __le16 cntlid;
+    char rsvd4[238];
+    char subsysnqn[NVME_NQN_LENGTH];
+    char hostnqn[NVME_NQN_LENGTH];
+    char rsvd5[256];
   };
 
 **Members**
 
+``cntlid``
+  **subsysnqn**
+  **hostnqn**
 
 
 
 
-.. c:type:: enum 
-
-
-**Constants**
-
-``NVME_ENABLE_ACRE``
-  *undescribed*
-
-
-
 
-.. c:type:: struct nvme_dsm_range
+.. c:type:: struct nvme_mi_read_nvm_ss_info
 
 
 **Definition**
 
 ::
 
-  struct nvme_dsm_range {
-    __le32 cattr;
-    __le32 nlb;
-    __le64 slba;
+  struct nvme_mi_read_nvm_ss_info {
+    __u8 nump;
+    __u8 mjr;
+    __u8 mnr;
+    __u8 rsvd3[29];
   };
 
 **Members**
@@ -9854,19 +9941,21 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_registered_ctrl
+.. c:type:: struct nvme_mi_port_pcie
 
 
 **Definition**
 
 ::
 
-  struct nvme_registered_ctrl {
-    __le16 cntlid;
-    __u8 rcsts;
-    __u8 rsvd3[5];
-    __le64 hostid;
-    __le64 rkey;
+  struct nvme_mi_port_pcie {
+    __u8 mps;
+    __u8 sls;
+    __u8 cls;
+    __u8 mlw;
+    __u8 nlw;
+    __u8 pn;
+    __u8 rsvd14[18];
   };
 
 **Members**
@@ -9875,20 +9964,20 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_registered_ctrl_ext
+.. c:type:: struct nvme_mi_port_smb
 
 
 **Definition**
 
 ::
 
-  struct nvme_registered_ctrl_ext {
-    __le16 cntlid;
-    __u8 rcsts;
-    __u8 rsvd3[5];
-    __le64 rkey;
-    __u8 hostid[16];
-    __u8 rsvd32[32];
+  struct nvme_mi_port_smb {
+    __u8 vpd_addr;
+    __u8 mvpd_freq;
+    __u8 mme_addr;
+    __u8 mme_freq;
+    __u8 nvmebm;
+    __u8 rsvd13[19];
   };
 
 **Members**
@@ -9897,60 +9986,54 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_reservation_status
+.. c:type:: struct nvme_mi_read_port_info
 
-   {
 
 **Definition**
 
 ::
 
-  struct nvme_reservation_status {
-    __le32 gen;
-    __u8 rtype;
-    __u8 regctl[2];
-    __u8 rsvd7[2];
-    __u8 ptpls;
-    __u8 rsvd10[14];
+  struct nvme_mi_read_port_info {
+    __u8 portt;
+    __u8 rsvd1;
+    __le16 mmctptus;
+    __le32 meb;
     union {
-      struct {
-        __u8 rsvd24[40];
-        struct nvme_registered_ctrl_ext regctl_eds[0];
-      };
-      struct nvme_registered_ctrl regctl_ds[0];
+      struct nvme_mi_port_pcie pcie;
+      struct nvme_mi_port_smb smb;
     };
   };
 
 **Members**
 
-``{unnamed_union}``
-  anonymous
+``portt``
+  **mmctptus**;
 
-``{unnamed_struct}``
+``{unnamed_union}``
   anonymous
 
 
 
 
 
-.. c:type:: struct nvme_streams_directive_params
+.. c:type:: struct nvme_mi_read_ctrl_info
 
+    **portid**; **prii**; **pri**; **vid**; **did**; **ssvid**; **ssid**;
 
 **Definition**
 
 ::
 
-  struct nvme_streams_directive_params {
-    __le16 msl;
-    __le16 nssa;
-    __le16 nsso;
-    __u8 nssc;
-    __u8 rsvd[9];
-    __le32 sws;
-    __le16 sgs;
-    __le16 nsa;
-    __le16 nso;
-    __u8 rsvd2[6];
+  struct nvme_mi_read_ctrl_info {
+    __u8 portid;
+    __u8 rsvd1[4];
+    __u8 prii;
+    __le16 pri;
+    __le16 vid;
+    __le16 did;
+    __le16 ssvid;
+    __le16 ssid;
+    __u8 rsvd16[16];
   };
 
 **Members**
@@ -9959,16 +10042,17 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_streams_directive_status
+.. c:type:: struct nvme_mi_osc
 
+    **type**; **opc**;
 
 **Definition**
 
 ::
 
-  struct nvme_streams_directive_status {
-    __le16 osc;
-    __le16 sid[];
+  struct nvme_mi_osc {
+    __u8 type;
+    __u8 opc;
   };
 
 **Members**
@@ -9977,17 +10061,16 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: struct nvme_id_directives
+.. c:type:: struct nvme_mi_read_sc_list
 
 
 **Definition**
 
 ::
 
-  struct nvme_id_directives {
-    __u8 supported[32];
-    __u8 enabled[32];
-    __u8 rsvd64[4032];
+  struct nvme_mi_read_sc_list {
+    __le16 numcmd;
+    struct nvme_mi_osc cmds[];
   };
 
 **Members**
@@ -9996,31 +10079,20 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: enum 
-
-
-**Constants**
-
-``NVME_ID_DIR_ID_BIT``
-  *undescribed*
-
-``NVME_ID_DIR_SD_BIT``
-  *undescribed*
-
-
-
-
-.. c:type:: struct nvme_host_mem_buf_desc
+.. c:type:: struct nvme_mi_nvm_ss_health_status
 
 
 **Definition**
 
 ::
 
-  struct nvme_host_mem_buf_desc {
-    __le64 addr;
-    __le32 size;
-    __u32 rsvd;
+  struct nvme_mi_nvm_ss_health_status {
+    __u8 nss;
+    __u8 sw;
+    __u8 ctemp;
+    __u8 pdlu;
+    __le16 ccs;
+    __u8 rsvd8[2];
   };
 
 **Members**
@@ -10029,170 +10101,167 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: enum nvme_ae_type
+.. c:type:: enum 
 
 
 **Constants**
 
-``NVME_AER_ERROR``
+``NVME_MI_CCS_RDY``
   *undescribed*
 
-``NVME_AER_SMART``
+``NVME_MI_CSS_CFS``
   *undescribed*
 
-``NVME_AER_NOTICE``
+``NVME_MI_CSS_SHST``
   *undescribed*
 
-``NVME_AER_CSS``
+``NVME_MI_CSS_NSSRO``
   *undescribed*
 
-``NVME_AER_VS``
+``NVME_MI_CSS_CECO``
   *undescribed*
 
+``NVME_MI_CSS_NAC``
+  *undescribed*
 
-
-
-.. c:type:: enum nvme_ae_info_error
-
-
-**Constants**
-
-``NVME_AER_ERROR_INVALID_DB_REG``
+``NVME_MI_CSS_FA``
   *undescribed*
 
-``NVME_AER_ERROR_INVALID_DB_VAL``
+``NVME_MI_CSS_CSTS``
   *undescribed*
 
-``NVME_AER_ERROR_DIAG_FAILURE``
+``NVME_MI_CSS_CTEMP``
   *undescribed*
 
-``NVME_AER_ERROR_PERSISTENT_INTERNAL_ERROR``
+``NVME_MI_CSS_PDLU``
   *undescribed*
 
-``NVME_AER_ERROR_TRANSIENT_INTERNAL_ERROR``
+``NVME_MI_CSS_SPARE``
   *undescribed*
 
-``NVME_AER_ERROR_FW_IMAGE_LOAD_ERROR``
+``NVME_MI_CSS_CCWARN``
   *undescribed*
 
 
 
 
-.. c:type:: enum nvme_ae_info_smart
+.. c:type:: struct nvme_mi_ctrl_heal_status
 
 
-**Constants**
+**Definition**
 
-``NVME_AER_SMART_SUBSYSTEM_RELIABILITY``
-  *undescribed*
+::
 
-``NVME_AER_SMART_TEMPERATURE_THRESHOLD``
-  *undescribed*
+  struct nvme_mi_ctrl_heal_status {
+    __le16 ctlid;
+    __le16 csts;
+    __le16 ctemp;
+    __u8 pdlu;
+    __u8 spare;
+    __u8 cwarn;
+    __u8 rsvd9[7];
+  };
 
-``NVME_AER_SMART_SPARE_THRESHOLD``
-  *undescribed*
+**Members**
 
 
 
 
-.. c:type:: enum nvme_ae_info_css_nvm
+
+.. c:type:: enum 
 
 
 **Constants**
 
-``NVME_AER_CSS_NVM_RESERVATION``
+``NVME_MI_CSTS_RDY``
   *undescribed*
 
-``NVME_AER_CSS_NVM_SANITIZE_COMPLETED``
+``NVME_MI_CSTS_CFS``
   *undescribed*
 
-``NVME_AER_CSS_NVM_UNEXPECTED_SANITIZE_DEALLOC``
+``NVME_MI_CSTS_SHST``
   *undescribed*
 
+``NVME_MI_CSTS_NSSRO``
+  *undescribed*
 
-
-
-.. c:type:: enum nvme_ae_info_notice
-
-
-**Constants**
-
-``NVME_AER_NOTICE_NS_CHANGED``
+``NVME_MI_CSTS_CECO``
   *undescribed*
 
-``NVME_AER_NOTICE_FW_ACT_STARTING``
+``NVME_MI_CSTS_NAC``
   *undescribed*
 
-``NVME_AER_NOTICE_TELEMETRY``
+``NVME_MI_CSTS_FA``
   *undescribed*
 
-``NVME_AER_NOTICE_ANA``
+``NVME_MI_CWARN_ST``
   *undescribed*
 
-``NVME_AER_NOTICE_PL_EVENT``
+``NVME_MI_CWARN_TAUT``
   *undescribed*
 
-``NVME_AER_NOTICE_LBA_STATUS_ALERT``
+``NVME_MI_CWARN_RD``
   *undescribed*
 
-``NVME_AER_NOTICE_EG_EVENT``
+``NVME_MI_CWARN_RO``
   *undescribed*
 
-``NVME_AER_NOTICE_DISC_CHANGED``
+``NVME_MI_CWARN_VMBF``
   *undescribed*
 
 
 
 
-.. c:type:: enum nvme_subsys_type
+.. c:type:: struct nvme_mi_vpd_mra
 
+    **nmravn**; **ff**; **i18vpwr**; **m18vpwr**; **i33vpwr**; **m33vpwr**; **m33vapsr**; **i5vapsr**; **m5vapsr**; **i12vapsr**; **m12vapsr**; **mtl**; **tnvmcap**[16];
 
-**Constants**
+**Definition**
 
-``NVME_NQN_DISC``
-  Discovery type target subsystem
+::
 
-``NVME_NQN_NVME``
-  NVME type target subsystem
+  struct nvme_mi_vpd_mra {
+    __u8 nmravn;
+    __u8 ff;
+    __u8 rsvd7[6];
+    __u8 i18vpwr;
+    __u8 m18vpwr;
+    __u8 i33vpwr;
+    __u8 m33vpwr;
+    __u8 rsvd17;
+    __u8 m33vapsr;
+    __u8 i5vapsr;
+    __u8 m5vapsr;
+    __u8 i12vapsr;
+    __u8 m12vapsr;
+    __u8 mtl;
+    __u8 tnvmcap[16];
+    __u8 rsvd37[27];
+  };
 
+**Members**
 
 
 
-.. c:type:: struct nvmf_disc_log_entry
 
-   Discovery log page entry
+
+.. c:type:: struct nvme_mi_vpd_ppmra
+
 
 **Definition**
 
 ::
 
-  struct nvmf_disc_log_entry {
-    __u8 trtype;
-    __u8 adrfam;
-    __u8 subtype;
-    __u8 treq;
-    __le16 portid;
-    __le16 cntlid;
-    __le16 asqsz;
-    __u8 rsvd10[22];
-    char trsvcid[NVMF_TRSVCID_SIZE];
-    __u8 rsvd64[192];
-    char subnqn[NVME_NQN_LENGTH];
-    char traddr[NVMF_TRADDR_SIZE];
-    union tsas {
-      char common[NVMF_TSAS_SIZE];
-      struct rdma {
-        __u8 qptype;
-        __u8 prtype;
-        __u8 cms;
-        __u8 rsvd3[5];
-        __u16 pkey;
-        __u8 rsvd10[246];
-      } rdma;
-      struct tcp {
-        __u8 sectype;
-      } tcp;
-    } tsas;
+  struct nvme_mi_vpd_ppmra {
+    __u8 nppmravn;
+    __u8 pn;
+    __u8 ppi;
+    __u8 ls;
+    __u8 mlw;
+    __u8 mctp;
+    __u8 refccap;
+    __u8 pi;
+    __u8 rsvd13[3];
   };
 
 **Members**
@@ -10201,1265 +10270,1315 @@ bytes, in size. This log captures the controller’s internal state.
 
 
 
-.. c:type:: enum 
-
-   Transport Type codes for Discovery Log Page entry TRTYPE field
-
-**Constants**
+.. c:type:: struct nvme_mi_vpd_telem
 
-``NVMF_TRTYPE_UNSPECIFIED``
-  Not indicated
 
-``NVMF_TRTYPE_RDMA``
-  RDMA
+**Definition**
 
-``NVMF_TRTYPE_FC``
-  Fibre Channel
+::
 
-``NVMF_TRTYPE_TCP``
-  TCP
+  struct nvme_mi_vpd_telem {
+    __u8 type;
+    __u8 rev;
+    __u8 len;
+    __u8 data[0];
+  };
 
-``NVMF_TRTYPE_LOOP``
-  Reserved for host usage
+**Members**
 
-``NVMF_TRTYPE_MAX``
-  *undescribed*
 
 
 
 
 .. c:type:: enum 
 
-   Address Family codes for Discovery Log Page entry ADRFAM field
 
 **Constants**
 
-``NVMF_ADDR_FAMILY_PCI``
-  PCIe
+``NVME_MI_ELEM_EED``
+  *undescribed*
 
-``NVMF_ADDR_FAMILY_IP4``
-  IPv4
+``NVME_MI_ELEM_USCE``
+  *undescribed*
 
-``NVMF_ADDR_FAMILY_IP6``
-  IPv6
+``NVME_MI_ELEM_ECED``
+  *undescribed*
 
-``NVMF_ADDR_FAMILY_IB``
-  InfiniBand
+``NVME_MI_ELEM_LED``
+  *undescribed*
 
-``NVMF_ADDR_FAMILY_FC``
-  Fibre Channel
+``NVME_MI_ELEM_SMBMED``
+  *undescribed*
 
+``NVME_MI_ELEM_PCIESED``
+  *undescribed*
 
+``NVME_MI_ELEM_NVMED``
+  *undescribed*
 
 
-.. c:type:: enum 
 
-   Transport Requirements codes for Discovery Log Page entry TREQ field
 
-**Constants**
+.. c:type:: struct nvme_mi_vpd_tra
 
-``NVMF_TREQ_NOT_SPECIFIED``
-  Not specified
 
-``NVMF_TREQ_REQUIRED``
-  Required
+**Definition**
 
-``NVMF_TREQ_NOT_REQUIRED``
-  Not Required
+::
 
-``NVMF_TREQ_DISABLE_SQFLOW``
-  SQ flow control disable supported
+  struct nvme_mi_vpd_tra {
+    __u8 vn;
+    __u8 rsvd6;
+    __u8 ec;
+    struct nvme_mi_vpd_telem elems[0];
+  };
 
+**Members**
 
 
 
-.. c:type:: enum 
 
-   RDMA QP Service Type codes for Discovery Log Page entry TSAS RDMA_QPTYPE field
 
-**Constants**
+.. c:type:: struct nvme_mi_vpd_mr_common
 
-``NVMF_RDMA_QPTYPE_CONNECTED``
-  Reliable Connected
 
-``NVMF_RDMA_QPTYPE_DATAGRAM``
-  Reliable Datagram
+**Definition**
+
+::
+
+  struct nvme_mi_vpd_mr_common {
+    __u8 type;
+    __u8 rf;
+    __u8 rlen;
+    __u8 rchksum;
+    __u8 hchksum;
+    union {
+      struct nvme_mi_vpd_mra nmra;
+      struct nvme_mi_vpd_ppmra ppmra;
+      struct nvme_mi_vpd_tra tmra;
+    };
+  };
+
+**Members**
 
+``{unnamed_union}``
+  anonymous
 
 
 
-.. c:type:: enum 
 
-   RDMA Provider Type codes for Discovery Log Page entry TSAS RDMA_PRTYPE field
 
-**Constants**
+.. c:type:: struct nvme_mi_vpd_hdr
 
-``NVMF_RDMA_PRTYPE_NOT_SPECIFIED``
-  No Provider Specified
 
-``NVMF_RDMA_PRTYPE_IB``
-  InfiniBand
+**Definition**
 
-``NVMF_RDMA_PRTYPE_ROCE``
-  InfiniBand RoCE
+::
 
-``NVMF_RDMA_PRTYPE_ROCEV2``
-  InfiniBand RoCEV2
+  struct nvme_mi_vpd_hdr {
+    __u8 ipmiver;
+    __u8 iuaoff;
+    __u8 ciaoff;
+    __u8 biaoff;
+    __u8 piaoff;
+    __u8 mrioff;
+    __u8 rsvd6;
+    __u8 chchk;
+    __u8 vpd[];
+  };
 
-``NVMF_RDMA_PRTYPE_IWARP``
-  iWARP
+**Members**
 
 
 
 
-.. c:type:: enum 
 
-   RDMA Connection Management Service Type codes for Discovery Log Page entry TSAS RDMA_CMS field
+.. c:type:: enum nvme_status_field
+
+   Defines all parts of the nvme status field: status code, status code type, and additional flags.
 
 **Constants**
 
-``NVMF_RDMA_CMS_RDMA_CM``
-  Sockets based endpoint addressing
+``NVME_SCT_GENERIC``
+  Generic errors applicable to multiple opcodes
 
+``NVME_SCT_CMD_SPECIFIC``
+  Errors associated to a specific opcode
 
+``NVME_SCT_MEDIA``
+  Errors associated with media and data integrity
 
+``NVME_SCT_PATH``
+  Errors associated with the paths connection
 
-.. c:type:: enum 
+``NVME_SCT_VS``
+  Vendor specific errors
 
+``NVME_SCT_MASK``
+  Mask to get the value of the Status Code Type
 
-**Constants**
+``NVME_SC_MASK``
+  Mask to get the value of the status code.
 
-``NVMF_TCP_SECTYPE_NONE``
-  No Security
+``NVME_SC_SUCCESS``
+  Successful Completion: The command
+  completed without error.
 
-``NVMF_TCP_SECTYPE_TLS``
-  Transport Layer Security
+``NVME_SC_INVALID_OPCODE``
+  Invalid Command Opcode: A reserved coded
+  value or an unsupported value in the
+  command opcode field.
 
+``NVME_SC_INVALID_FIELD``
+  Invalid Field in Command: A reserved
+  coded value or an unsupported value in a
+  defined field.
 
+``NVME_SC_CMDID_CONFLICT``
+  Command ID Conflict: The command
+  identifier is already in use.
 
+``NVME_SC_DATA_XFER_ERROR``
+  Data Transfer Error: Transferring the
+  data or metadata associated with a
+  command experienced an error.
 
-.. c:type:: struct nvmf_discovery_log
+``NVME_SC_POWER_LOSS``
+  Commands Aborted due to Power Loss
+  Notification: Indicates that the command
+  was aborted due to a power loss
+  notification.
 
+``NVME_SC_INTERNAL``
+  Internal Error: The command was not
+  completed successfully due to an internal error.
 
-**Definition**
+``NVME_SC_ABORT_REQ``
+  Command Abort Requested: The command was
+  aborted due to an Abort command being
+  received that specified the Submission
+  Queue Identifier and Command Identifier
+  of this command.
 
-::
+``NVME_SC_ABORT_QUEUE``
+  Command Aborted due to SQ Deletion: The
+  command was aborted due to a Delete I/O
+  Submission Queue request received for the
+  Submission Queue to which the command was
+  submitted.
 
-  struct nvmf_discovery_log {
-    __le64 genctr;
-    __le64 numrec;
-    __le16 recfmt;
-    __u8 rsvd14[1006];
-    struct nvmf_disc_log_entry entries[0];
-  };
+``NVME_SC_FUSED_FAIL``
+  Command Aborted due to Failed Fused Command:
+  The command was aborted due to the other
+  command in a fused operation failing.
 
-**Members**
+``NVME_SC_FUSED_MISSING``
+  Aborted due to Missing Fused Command: The
+  fused command was aborted due to the
+  adjacent submission queue entry not
+  containing a fused command that is the
+  other command.
 
+``NVME_SC_INVALID_NS``
+  Invalid Namespace or Format: The
+  namespace or the format of that namespace
+  is invalid.
 
+``NVME_SC_CMD_SEQ_ERROR``
+  Command Sequence Error: The command was
+  aborted due to a protocol violation in a
+  multi-command sequence.
 
+``NVME_SC_SGL_INVALID_LAST``
+  Invalid SGL Segment Descriptor: The
+  command includes an invalid SGL Last
+  Segment or SGL Segment descriptor.
 
+``NVME_SC_SGL_INVALID_COUNT``
+  Invalid Number of SGL Descriptors: There
+  is an SGL Last Segment descriptor or an
+  SGL Segment descriptor in a location
+  other than the last descriptor of a
+  segment based on the length indicated.
 
-.. c:type:: struct nvmf_connect_data
+``NVME_SC_SGL_INVALID_DATA``
+  Data SGL Length Invalid: This may occur
+  if the length of a Data SGL is too short.
+  This may occur if the length of a Data
+  SGL is too long and the controller does
+  not support SGL transfers longer than the
+  amount of data to be transferred as
+  indicated in the SGL Support field of the
+  Identify Controller data structure.
 
+``NVME_SC_SGL_INVALID_METADATA``
+  Metadata SGL Length Invalid: This may
+  occur if the length of a Metadata SGL is
+  too short. This may occur if the length
+  of a Metadata SGL is too long and the
+  controller does not support SGL transfers
+  longer than the amount of data to be
+  transferred as indicated in the SGL
+  Support field of the Identify Controller
+  data structure.
 
-**Definition**
+``NVME_SC_SGL_INVALID_TYPE``
+  SGL Descriptor Type Invalid: The type of
+  an SGL Descriptor is a type that is not
+  supported by the controller.
 
-::
+``NVME_SC_CMB_INVALID_USE``
+  Invalid Use of Controller Memory Buffer:
+  The attempted use of the Controller
+  Memory Buffer is not supported by the
+  controller.
 
-  struct nvmf_connect_data {
-    __u8 hostid[16];
-    __le16 cntlid;
-    char rsvd4[238];
-    char subsysnqn[NVME_NQN_LENGTH];
-    char hostnqn[NVME_NQN_LENGTH];
-    char rsvd5[256];
-  };
+``NVME_SC_PRP_INVALID_OFFSET``
+  PRP Offset Invalid: The Offset field for
+  a PRP entry is invalid.
 
-**Members**
+``NVME_SC_AWU_EXCEEDED``
+  Atomic Write Unit Exceeded: The length
+  specified exceeds the atomic write unit size.
 
-``cntlid``
-  **subsysnqn**
-  **hostnqn**
+``NVME_SC_OP_DENIED``
+  Operation Denied: The command was denied
+  due to lack of access rights. Refer to
+  the appropriate security specification.
+
+``NVME_SC_SGL_INVALID_OFFSET``
+  SGL Offset Invalid: The offset specified
+  in a descriptor is invalid. This may
+  occur when using capsules for data
+  transfers in NVMe over Fabrics
+  implementations and an invalid offset in
+  the capsule is specified.
+
+``NVME_SC_HOSTID_FORMAT``
+  Host Identifier Inconsistent Format: The
+  NVM subsystem detected the simultaneous
+  use of 64- bit and 128-bit Host
+  Identifier values on different
+  controllers.
 
+``NVME_SC_KAT_EXPIRED``
+  Keep Alive Timer Expired: The Keep Alive
+  Timer expired.
 
+``NVME_SC_KAT_INVALID``
+  Keep Alive Timeout Invalid: The Keep
+  Alive Timeout value specified is invalid.
 
+``NVME_SC_CMD_ABORTED_PREMEPT``
+  Command Aborted due to Preempt and Abort:
+  The command was aborted due to a
+  Reservation Acquire command.
 
+``NVME_SC_SANITIZE_FAILED``
+  Sanitize Failed: The most recent sanitize
+  operation failed and no recovery action
+  has been successfully completed.
 
-.. c:type:: struct nvme_mi_read_nvm_ss_info
+``NVME_SC_SANITIZE_IN_PROGRESS``
+  Sanitize In Progress: The requested
+  function (e.g., command) is prohibited
+  while a sanitize operation is in
+  progress.
 
+``NVME_SC_SGL_INVALID_GRANULARITY``
+  SGL Data Block Granularity Invalid: The
+  Address alignment or Length granularity
+  for an SGL Data Block descriptor is
+  invalid.
 
-**Definition**
+``NVME_SC_CMD_IN_CMBQ_NOT_SUPP``
+  Command Not Supported for Queue in CMB:
+  The implementation does not support
+  submission of the command to a Submission
+  Queue in the Controller Memory Buffer or
+  command completion to a Completion Queue
+  in the Controller Memory Buffer.
 
-::
+``NVME_SC_NS_WRITE_PROTECTED``
+  Namespace is Write Protected: The command
+  is prohibited while the namespace is
+  write protected as a result of a change
+  in the namespace write protection state
+  as defined by the Namespace Write
+  Protection State Machine.
 
-  struct nvme_mi_read_nvm_ss_info {
-    __u8 nump;
-    __u8 mjr;
-    __u8 mnr;
-    __u8 rsvd3[29];
-  };
+``NVME_SC_CMD_INTERRUPTED``
+  Command Interrupted: Command processing
+  was interrupted and the controller is
+  unable to successfully complete the
+  command. The host should retry the
+  command.
 
-**Members**
+``NVME_SC_TRAN_TPORT_ERROR``
+  Transient Transport Error: A transient
+  transport error was detected. If the
+  command is retried on the same
+  controller, the command is likely to
+  succeed. A command that fails with a
+  transient transport error four or more
+  times should be treated as a persistent
+  transport error that is not likely to
+  succeed if retried on the same
+  controller.
 
+``NVME_SC_LBA_RANGE``
+  LBA Out of Range: The command references
+  an LBA that exceeds the size of the namespace.
 
+``NVME_SC_CAP_EXCEEDED``
+  Capacity Exceeded: Execution of the
+  command has caused the capacity of the
+  namespace to be exceeded.
 
+``NVME_SC_NS_NOT_READY``
+  Namespace Not Ready: The namespace is not
+  ready to be accessed as a result of a
+  condition other than a condition that is
+  reported as an Asymmetric Namespace
+  Access condition.
 
+``NVME_SC_RESERVATION_CONFLICT``
+  Reservation Conflict: The command was
+  aborted due to a conflict with a
+  reservation held on the accessed
+  namespace.
 
-.. c:type:: struct nvme_mi_port_pcie
+``NVME_SC_FORMAT_IN_PROGRESS``
+  Format In Progress: A Format NVM command
+  is in progress on the namespace.
 
+``NVME_SC_CQ_INVALID``
+  Completion Queue Invalid: The Completion
+  Queue identifier specified in the command
+  does not exist.
 
-**Definition**
+``NVME_SC_QID_INVALID``
+  Invalid Queue Identifier: The creation of
+  the I/O Completion Queue failed due to an
+  invalid queue identifier specified as
+  part of the command. An invalid queue
+  identifier is one that is currently in
+  use or one that is outside the range
+  supported by the controller.
 
-::
+``NVME_SC_QUEUE_SIZE``
+  Invalid Queue Size: The host attempted to
+  create an I/O Completion Queue with an
+  invalid number of entries.
 
-  struct nvme_mi_port_pcie {
-    __u8 mps;
-    __u8 sls;
-    __u8 cls;
-    __u8 mlw;
-    __u8 nlw;
-    __u8 pn;
-    __u8 rsvd14[18];
-  };
+``NVME_SC_ABORT_LIMIT``
+  Abort Command Limit Exceeded: The number
+  of concurrently outstanding Abort commands has exceeded the limit indicated
+                                     in the Identify Controller data
+                                     structure.
 
-**Members**
+``NVME_SC_ABORT_MISSING``
+  Abort Command is missing: The abort
+  command is missing.
 
+``NVME_SC_ASYNC_LIMIT``
+  Asynchronous Event Request Limit
+  Exceeded: The number of concurrently
+  outstanding Asynchronous Event Request
+  commands has been exceeded.
 
+``NVME_SC_FIRMWARE_SLOT``
+  Invalid Firmware Slot: The firmware slot
+  indicated is invalid or read only. This
+  error is indicated if the firmware slot
+  exceeds the number supported.
 
+``NVME_SC_FIRMWARE_IMAGE``
+  Invalid Firmware Image: The firmware
+  image specified for activation is invalid
+  and not loaded by the controller.
 
+``NVME_SC_INVALID_VECTOR``
+  Invalid Interrupt Vector: The creation of
+  the I/O Completion Queue failed due to an
+  invalid interrupt vector specified as
+  part of the command.
 
-.. c:type:: struct nvme_mi_port_smb
+``NVME_SC_INVALID_LOG_PAGE``
+  Invalid Log Page: The log page indicated
+  is invalid. This error condition is also
+  returned if a reserved log page is
+  requested.
 
+``NVME_SC_INVALID_FORMAT``
+  Invalid Format: The LBA Format specified
+  is not supported.
 
-**Definition**
+``NVME_SC_FW_NEEDS_CONV_RESET``
+  Firmware Activation Requires Conventional Reset:
+  The firmware commit was successful,
+  however, activation of the firmware image
+  requires a conventional reset.
 
-::
+``NVME_SC_INVALID_QUEUE``
+  Invalid Queue Deletion: Invalid I/O
+  Completion Queue specified to delete.
 
-  struct nvme_mi_port_smb {
-    __u8 vpd_addr;
-    __u8 mvpd_freq;
-    __u8 mme_addr;
-    __u8 mme_freq;
-    __u8 nvmebm;
-    __u8 rsvd13[19];
-  };
+``NVME_SC_FEATURE_NOT_SAVEABLE``
+  Feature Identifier Not Saveable: The
+  Feature Identifier specified does not
+  support a saveable value.
 
-**Members**
+``NVME_SC_FEATURE_NOT_CHANGEABLE``
+  Feature Not Changeable: The Feature
+  Identifier is not able to be changed.
 
+``NVME_SC_FEATURE_NOT_PER_NS``
+  Feature Not Namespace Specific: The
+  Feature Identifier specified is not
+  namespace specific. The Feature
+  Identifier settings apply across all
+  namespaces.
 
+``NVME_SC_FW_NEEDS_SUBSYS_RESET``
+  Firmware Activation Requires NVM
+  Subsystem Reset: The firmware commit was
+  successful, however, activation of the
+  firmware image requires an NVM Subsystem.
 
+``NVME_SC_FW_NEEDS_RESET``
+  Firmware Activation Requires Controller
+  Level Reset: The firmware commit was
+  successful; however, the image specified
+  does not support being activated without
+  a reset.
 
+``NVME_SC_FW_NEEDS_MAX_TIME``
+  Firmware Activation Requires Maximum Time
+  Violation: The image specified if
+  activated immediately would exceed the
+  Maximum Time for Firmware Activation
+  (MTFA) value reported in Identify
+  Controller.
 
-.. c:type:: struct nvme_mi_read_port_info
+``NVME_SC_FW_ACTIVATE_PROHIBITED``
+  Firmware Activation Prohibited: The image
+  specified is being prohibited from
+  activation by the controller for vendor
+  specific reasons.
 
+``NVME_SC_OVERLAPPING_RANGE``
+  Overlapping Range: The downloaded
+  firmware image has overlapping ranges.
 
-**Definition**
+``NVME_SC_NS_INSUFFICIENT_CAP``
+  Namespace Insufficient Capacity: Creating
+  the namespace requires more free space
+  than is currently available.
 
-::
+``NVME_SC_NS_ID_UNAVAILABLE``
+  Namespace Identifier Unavailable: The
+  number of namespaces supported has been
+  exceeded.
 
-  struct nvme_mi_read_port_info {
-    __u8 portt;
-    __u8 rsvd1;
-    __le16 mmctptus;
-    __le32 meb;
-    union {
-      struct nvme_mi_port_pcie pcie;
-      struct nvme_mi_port_smb smb;
-    };
-  };
+``NVME_SC_NS_ALREADY_ATTACHED``
+  Namespace Already Attached: The
+  controller is already attached to the
+  namespace specified.
 
-**Members**
+``NVME_SC_NS_IS_PRIVATE``
+  Namespace Is Private: The namespace is
+  private and is already attached to one
+  controller.
 
-``portt``
-  **mmctptus**;
+``NVME_SC_NS_NOT_ATTACHED``
+  Namespace Not Attached: The request to
+  detach the controller could not be
+  completed because the controller is not
+  attached to the namespace.
 
-``{unnamed_union}``
-  anonymous
+``NVME_SC_THIN_PROV_NOT_SUPP``
+  Thin Provisioning Not Supported: Thin
+  provisioning is not supported by the
+  controller.
 
+``NVME_SC_CTRL_LIST_INVALID``
+  Controller List Invalid: The controller
+  list provided contains invalid controller
+  ids.
 
+``NVME_SC_SELF_TEST_IN_PROGRESS``
+  Device Self-test In Progress:
 
+``NVME_SC_BP_WRITE_PROHIBITED``
+  Boot Partition Write Prohibited: The
+  command is trying to modify a locked Boot
+  Partition.
 
+``NVME_SC_INVALID_CTRL_ID``
+  Invalid Controller Identifier:
 
-.. c:type:: struct nvme_mi_read_ctrl_info
+``NVME_SC_INVALID_SEC_CTRL_STATE``
+  Invalid Secondary Controller State
 
-    **portid**; **prii**; **pri**; **vid**; **did**; **ssvid**; **ssid**;
+``NVME_SC_INVALID_CTRL_RESOURCES``
+  Invalid Number of Controller Resources
 
-**Definition**
+``NVME_SC_INVALID_RESOURCE_ID``
+  Invalid Resource Identifier
 
-::
+``NVME_SC_PMR_SAN_PROHIBITED``
+  Sanitize Prohibited While Persistent
+  Memory Region is Enabled
 
-  struct nvme_mi_read_ctrl_info {
-    __u8 portid;
-    __u8 rsvd1[4];
-    __u8 prii;
-    __le16 pri;
-    __le16 vid;
-    __le16 did;
-    __le16 ssvid;
-    __le16 ssid;
-    __u8 rsvd16[16];
-  };
+``NVME_SC_ANA_GROUP_ID_INVALID``
+  ANA Group Identifier Invalid
 
-**Members**
+``NVME_SC_ANA_ATTACH_FAILED``
+  ANA Attach Failed
 
+``NVME_SC_BAD_ATTRIBUTES``
+  Conflicting Dataset Management Attributes
 
+``NVME_SC_INVALID_PI``
+  Invalid Protection Information
 
+``NVME_SC_READ_ONLY``
+  Attempted Write to Read Only Range
 
+``NVME_SC_CONNECT_FORMAT``
+  Incompatible Format: The NVM subsystem
+  does not support the record format
+  specified by the host.
 
-.. c:type:: struct nvme_mi_osc
+``NVME_SC_CONNECT_CTRL_BUSY``
+  Controller Busy: The controller is
+  already associated with a host.
 
-    **type**; **opc**;
+``NVME_SC_CONNECT_INVALID_PARAM``
+  Connect Invalid Parameters: One or more
+  of the command parameters.
 
-**Definition**
+``NVME_SC_CONNECT_RESTART_DISC``
+  Connect Restart Discovery: The NVM
+  subsystem requested is not available.
 
-::
+``NVME_SC_CONNECT_INVALID_HOST``
+  Connect Invalid Host: The host is either
+  not allowed to establish an association
+  to any controller in the NVM subsystem or
+  the host is not allowed to establish an
+  association to the specified controller
 
-  struct nvme_mi_osc {
-    __u8 type;
-    __u8 opc;
-  };
+``NVME_SC_DISCONNECT_INVALID_QTYPE``
+  Invalid Queue Type: The command was sent
+  on the wrong queue type.
 
-**Members**
+``NVME_SC_DISCOVERY_RESTART``
+  Discover Restart: The snapshot of the
+  records is now invalid or out of date.
 
+``NVME_SC_AUTH_REQUIRED``
+  Authentication Required: NVMe in-band
+  authentication is required and the queue
+  has not yet been authenticated.
 
+``NVME_SC_WRITE_FAULT``
+  Write Fault: The write data could not be
+  committed to the media.
 
+``NVME_SC_READ_ERROR``
+  Unrecovered Read Error: The read data
+  could not be recovered from the media.
 
+``NVME_SC_GUARD_CHECK``
+  End-to-end Guard Check Error: The command
+  was aborted due to an end-to-end guard
+  check failure.
 
-.. c:type:: struct nvme_mi_read_sc_list
+``NVME_SC_APPTAG_CHECK``
+  End-to-end Application Tag Check Error:
+  The command was aborted due to an
+  end-to-end application tag check failure.
 
+``NVME_SC_REFTAG_CHECK``
+  End-to-end Reference Tag Check Error: The
+  command was aborted due to an end-to-end
+  reference tag check failure.
 
-**Definition**
+``NVME_SC_COMPARE_FAILED``
+  Compare Failure: The command failed due
+  to a miscompare during a Compare command.
 
-::
+``NVME_SC_ACCESS_DENIED``
+  Access Denied: Access to the namespace
+  and/or LBA range is denied due to lack of
+  access rights.
 
-  struct nvme_mi_read_sc_list {
-    __le16 numcmd;
-    struct nvme_mi_osc cmds[];
-  };
+``NVME_SC_UNWRITTEN_BLOCK``
+  Deallocated or Unwritten Logical Block:
+  The command failed due to an attempt to
+  read from or verify an LBA range
+  containing a deallocated or unwritten
+  logical block.
 
-**Members**
+``NVME_SC_ANA_INTERNAL_PATH_ERROR``
+  Internal Path Error: The command was not
+  completed as the result of a controller
+  internal error that is specific to the
+  controller processing the command.
 
+``NVME_SC_ANA_PERSISTENT_LOSS``
+  Asymmetric Access Persistent Loss: The
+  requested function (e.g., command) is not
+  able to be performed as a result of the
+  relationship between the controller and
+  the namespace being in the ANA Persistent
+  Loss state.
 
+``NVME_SC_ANA_INACCESSIBLE``
+  Asymmetric Access Inaccessible: The
+  requested function (e.g., command) is not
+  able to be performed as a result of the
+  relationship between the controller and
+  the namespace being in the ANA
+  Inaccessible state.
 
+``NVME_SC_ANA_TRANSITION``
+  Asymmetric Access Transition: The
+  requested function (e.g., command) is not
+  able to be performed as a result of the
+  relationship between the controller and
+  the namespace transitioning between
+  Asymmetric Namespace Access states.
 
+``NVME_SC_CTRL_PATH_ERROR``
+  Controller Pathing Error: A pathing error
+  was detected by the controller.
 
-.. c:type:: struct nvme_mi_nvm_ss_health_status
+``NVME_SC_HOST_PATH_ERROR``
+  Host Pathing Error: A pathing error was
+  detected by the host.
 
+``NVME_SC_CMD_ABORTED_BY_HOST``
+  Command Aborted By Host: The command was
+  aborted as a result of host action.
 
-**Definition**
+``NVME_SC_CRD``
+  Mask to get value of Command Retry Delay
+  index
 
-::
+``NVME_SC_MORE``
+  More bit. If set, more status information
+  for this command as part of the Error
+  Information log that may be retrieved with
+  the Get Log Page command.
 
-  struct nvme_mi_nvm_ss_health_status {
-    __u8 nss;
-    __u8 sw;
-    __u8 ctemp;
-    __u8 pdlu;
-    __le16 ccs;
-    __u8 rsvd8[2];
-  };
+``NVME_SC_DNR``
+  Do Not Retry bit. If set, if the same
+  command is re-submitted to any controller
+  in the NVM subsystem, then that
+  re-submitted command is expected to fail.
 
-**Members**
 
+.. c:function:: __u16 nvme_status_code_type (__u16 status_field)
 
+   Returns the NVMe Status Code Type
 
+**Parameters**
 
+``__u16 status_field``
+  The NVMe Completion Queue Entry's Status Field
 
-.. c:type:: enum 
+**Description**
 
+See :c:type:`enum nvme_status_field <nvme_status_field>`
 
-**Constants**
 
-``NVME_MI_CCS_RDY``
-  *undescribed*
+.. c:function:: __u16 nvme_status_code (__u16 status_field)
 
-``NVME_MI_CSS_CFS``
-  *undescribed*
+   Returns the NVMe Status Code
 
-``NVME_MI_CSS_SHST``
-  *undescribed*
+**Parameters**
 
-``NVME_MI_CSS_NSSRO``
-  *undescribed*
+``__u16 status_field``
+  The NVMe Completion Queue Entry's Status Field
 
-``NVME_MI_CSS_CECO``
-  *undescribed*
+**Description**
 
-``NVME_MI_CSS_NAC``
-  *undescribed*
+See :c:type:`enum nvme_status_field <nvme_status_field>`
 
-``NVME_MI_CSS_FA``
-  *undescribed*
 
-``NVME_MI_CSS_CSTS``
-  *undescribed*
+.. c:function:: __u8 nvme_status_to_errno (int status, bool fabrics)
 
-``NVME_MI_CSS_CTEMP``
-  *undescribed*
+   Converts nvme return status to errno
 
-``NVME_MI_CSS_PDLU``
-  *undescribed*
+**Parameters**
 
-``NVME_MI_CSS_SPARE``
-  *undescribed*
+``int status``
+  Return status from an nvme passthrough commmand
 
-``NVME_MI_CSS_CCWARN``
-  *undescribed*
+``bool fabrics``
+  Set to true if :c:type:`status` is to a fabrics target.
 
+**Return**
 
+An errno representing the nvme status if it is an nvme status field,
+or unchanged status is < 0 since errno is already set.
 
 
-.. c:type:: struct nvme_mi_ctrl_heal_status
+.. c:function:: int nvme_fw_download_seq (int fd, __u32 size, __u32 xfer, __u32 offset, void * buf)
 
 
-**Definition**
+**Parameters**
 
-::
+``int fd``
+  File descriptor of nvme device
 
-  struct nvme_mi_ctrl_heal_status {
-    __le16 ctlid;
-    __le16 csts;
-    __le16 ctemp;
-    __u8 pdlu;
-    __u8 spare;
-    __u8 cwarn;
-    __u8 rsvd9[7];
-  };
+``__u32 size``
+  Total size of the firmware image to transfer
 
-**Members**
+``__u32 xfer``
+  Maximum size to send with each partial transfer
 
+``__u32 offset``
+  Starting offset to send with this firmware downlaod
 
+``void * buf``
+  Address of buffer containing all or part of the firmware image.
 
+**Return**
 
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-.. c:type:: enum 
 
+.. c:function:: int nvme_get_ctrl_telemetry (int fd, bool rae, struct nvme_telemetry_log ** log)
 
-**Constants**
 
-``NVME_MI_CSTS_RDY``
-  *undescribed*
+**Parameters**
 
-``NVME_MI_CSTS_CFS``
-  *undescribed*
+``int fd``
+  File descriptor of nvme device
 
-``NVME_MI_CSTS_SHST``
-  *undescribed*
+``bool rae``
+  Retain asynchronous events
 
-``NVME_MI_CSTS_NSSRO``
-  *undescribed*
+``struct nvme_telemetry_log ** log``
+  On success, set to the value of the allocated and retreived log.
 
-``NVME_MI_CSTS_CECO``
-  *undescribed*
+**Description**
 
-``NVME_MI_CSTS_NAC``
-  *undescribed*
+The total size allocated can be calculated as:
+  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
 
-``NVME_MI_CSTS_FA``
-  *undescribed*
+**Return**
 
-``NVME_MI_CWARN_ST``
-  *undescribed*
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-``NVME_MI_CWARN_TAUT``
-  *undescribed*
 
-``NVME_MI_CWARN_RD``
-  *undescribed*
+.. c:function:: int nvme_get_host_telemetry (int fd, struct nvme_telemetry_log ** log)
 
-``NVME_MI_CWARN_RO``
-  *undescribed*
 
-``NVME_MI_CWARN_VMBF``
-  *undescribed*
+**Parameters**
 
+``int fd``
+  File descriptor of nvme device
 
+``struct nvme_telemetry_log ** log``
+  On success, set to the value of the allocated and retreived log.
 
+**Description**
 
-.. c:type:: struct nvme_mi_vpd_mra
+The total size allocated can be calculated as:
+  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
 
-    **nmravn**; **ff**; **i18vpwr**; **m18vpwr**; **i33vpwr**; **m33vpwr**; **m33vapsr**; **i5vapsr**; **m5vapsr**; **i12vapsr**; **m12vapsr**; **mtl**; **tnvmcap**[16];
+**Return**
 
-**Definition**
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-::
 
-  struct nvme_mi_vpd_mra {
-    __u8 nmravn;
-    __u8 ff;
-    __u8 rsvd7[6];
-    __u8 i18vpwr;
-    __u8 m18vpwr;
-    __u8 i33vpwr;
-    __u8 m33vpwr;
-    __u8 rsvd17;
-    __u8 m33vapsr;
-    __u8 i5vapsr;
-    __u8 m5vapsr;
-    __u8 i12vapsr;
-    __u8 m12vapsr;
-    __u8 mtl;
-    __u8 tnvmcap[16];
-    __u8 rsvd37[27];
-  };
+.. c:function:: int nvme_get_new_host_telemetry (int fd, struct nvme_telemetry_log ** log)
 
-**Members**
 
+**Parameters**
 
+``int fd``
+  File descriptor of nvme device
 
+``struct nvme_telemetry_log ** log``
+  On success, set to the value of the allocated and retreived log.
 
+**Description**
 
-.. c:type:: struct nvme_mi_vpd_ppmra
+The total size allocated can be calculated as:
+  (:c:type:`struct nvme_telemetry_log <nvme_telemetry_log>`.dalb3 + 1) * ``NVME_LOG_TELEM_BLOCK_SIZE``.
 
+**Return**
 
-**Definition**
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-::
 
-  struct nvme_mi_vpd_ppmra {
-    __u8 nppmravn;
-    __u8 pn;
-    __u8 ppi;
-    __u8 ls;
-    __u8 mlw;
-    __u8 mctp;
-    __u8 refccap;
-    __u8 pi;
-    __u8 rsvd13[3];
-  };
+.. c:function:: void nvme_init_id_ns (struct nvme_id_ns * ns, __u64 nsze, __u64 ncap, __u8 flbas, __u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid)
 
-**Members**
+   Initialize an Identify Namepsace structure for creation.
 
+**Parameters**
 
+``struct nvme_id_ns * ns``
+  Address of the Identify Namespace structure to initialize
 
+``__u64 nsze``
+  Namespace size
 
+``__u64 ncap``
+  namespace capacity
 
-.. c:type:: struct nvme_mi_vpd_telem
+``__u8 flbas``
+  formatted logical block size settings
 
+``__u8 dps``
+  Data protection settings
 
-**Definition**
+``__u8 nmic``
+  Namespace sharing capabilities
 
-::
+``__u32 anagrpid``
+  ANA group identifier
 
-  struct nvme_mi_vpd_telem {
-    __u8 type;
-    __u8 rev;
-    __u8 len;
-    __u8 data[0];
-  };
+``__u16 nvmsetid``
+  NVM Set identifer
 
-**Members**
+**Description**
 
+This is intended to be used with a namespace management "create", see
+:c:type:`nvme_ns_mgmt_create`().
 
 
+.. c:function:: void nvme_init_ctrl_list (struct nvme_ctrl_list * cntlist, __u16 num_ctrls, __u16 * ctrlist)
 
+   Initialize an nvme_ctrl_list structure from an array.
 
-.. c:type:: enum 
+**Parameters**
 
+``struct nvme_ctrl_list * cntlist``
+  The controller list structure to initialize
 
-**Constants**
+``__u16 num_ctrls``
+  The number of controllers in the array, :c:type:`ctrlist`.
 
-``NVME_MI_ELEM_EED``
-  *undescribed*
+``__u16 * ctrlist``
+  An array of controller identifiers in CPU native endian.
 
-``NVME_MI_ELEM_USCE``
-  *undescribed*
+**Description**
 
-``NVME_MI_ELEM_ECED``
-  *undescribed*
+This is intended to be used with any command that takes a controller list
+argument. See :c:type:`nvme_ns_attach_ctrls`() and :c:type:`nvme_ns_detach`().
 
-``NVME_MI_ELEM_LED``
-  *undescribed*
 
-``NVME_MI_ELEM_SMBMED``
-  *undescribed*
+.. c:function:: void nvme_init_dsm_range (struct nvme_dsm_range * dsm, __u32 * ctx_attrs, __u32 * llbas, __u64 * slbas, __u16 nr_ranges)
 
-``NVME_MI_ELEM_PCIESED``
-  *undescribed*
+   Constructs a data set range structure
 
-``NVME_MI_ELEM_NVMED``
-  *undescribed*
+**Parameters**
 
+``struct nvme_dsm_range * dsm``
+  DSM range array
 
+``__u32 * ctx_attrs``
+  Array of context attributes
 
+``__u32 * llbas``
+  Array of length in logical blocks
 
-.. c:type:: struct nvme_mi_vpd_tra
+``__u64 * slbas``
+  Array of starting logical blocks
 
+``__u16 nr_ranges``
+  The size of the dsm arrays
 
-**Definition**
+**Description**
 
-::
+Each array must be the same size of size 'nr_ranges'. This is intended to be
+used with constructing a payload for :c:type:`nvme_dsm`().
 
-  struct nvme_mi_vpd_tra {
-    __u8 vn;
-    __u8 rsvd6;
-    __u8 ec;
-    struct nvme_mi_vpd_telem elems[0];
-  };
+**Return**
 
-**Members**
+The nvme command status if a response was received or -errno
+otherwise.
 
 
+.. c:function:: int __nvme_get_log_page (int fd, __u32 nsid, __u8 log_id, bool rae, __u32 xfer_len, __u32 data_len, void * data)
 
 
+**Parameters**
 
-.. c:type:: struct nvme_mi_vpd_mr_common
+``int fd``
+  File descriptor of nvme device
 
+``__u32 nsid``
+  Namespace Identifier, if applicable.
 
-**Definition**
+``__u8 log_id``
+  Log Identifier, see :c:type:`enum nvme_cmd_get_log_lid <nvme_cmd_get_log_lid>`.
 
-::
+``bool rae``
+  Retain asynchronous events
 
-  struct nvme_mi_vpd_mr_common {
-    __u8 type;
-    __u8 rf;
-    __u8 rlen;
-    __u8 rchksum;
-    __u8 hchksum;
-    union {
-      struct nvme_mi_vpd_mra nmra;
-      struct nvme_mi_vpd_ppmra ppmra;
-      struct nvme_mi_vpd_tra tmra;
-    };
-  };
+``__u32 xfer_len``
+  Max log transfer size per request to split the total.
 
-**Members**
+``__u32 data_len``
+  Total length of the log to transfer.
 
-``{unnamed_union}``
-  anonymous
+``void * data``
+  User address of at least :c:type:`data_len` to store the log.
 
+**Return**
 
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
 
+.. c:function:: int nvme_get_log_page (int fd, __u32 nsid, __u8 log_id, bool rae, __u32 data_len, void * data)
 
-.. c:type:: struct nvme_mi_vpd_hdr
 
+**Parameters**
 
-**Definition**
+``int fd``
+  File descriptor of nvme device
 
-::
+``__u32 nsid``
+  Namespace Identifier, if applicable.
 
-  struct nvme_mi_vpd_hdr {
-    __u8 ipmiver;
-    __u8 iuaoff;
-    __u8 ciaoff;
-    __u8 biaoff;
-    __u8 piaoff;
-    __u8 mrioff;
-    __u8 rsvd6;
-    __u8 chchk;
-    __u8 vpd[];
-  };
+``__u8 log_id``
+  Log Identifier, see :c:type:`enum nvme_cmd_get_log_lid <nvme_cmd_get_log_lid>`.
 
-**Members**
+``bool rae``
+  Retain asynchronous events
 
+``__u32 data_len``
+  Total length of the log to transfer.
 
+``void * data``
+  User address of at least :c:type:`data_len` to store the log.
 
+**Description**
 
+Calls __nvme_get_log_page() with a default 4k transfer length, as that is
+guarnateed by the protocol to be a safe transfer size.
 
-.. c:type:: enum nvme_status_field
+**Return**
 
-   Defines all parts of the nvme status field: status code, status code type, and additional flags.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-**Constants**
 
-``NVME_SCT_MASK``
-  Mask to get the value of the Status Code Type
+.. c:function:: int nvme_get_ana_log_len (int fd, size_t * analen)
 
-``NVME_SCT_GENERIC``
-  Generic errors applicable to multiple opcodes
+   Retreive size of the current ANA log
 
-``NVME_SCT_CMD_SPECIFIC``
-  Errors associated to a specific opcode
+**Parameters**
 
-``NVME_SCT_MEDIA``
-  Errors associated with media and data integrity
+``int fd``
+  File descriptor of nvme device
 
-``NVME_SCT_PATH``
-  Errors associated with the paths connection
+``size_t * analen``
+  Pointer to where the length will be set on success
 
-``NVME_SCT_VS``
-  Vendor specific errors
+**Return**
 
-``NVME_SC_MASK``
-  Mask to get the value of the status code.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-``NVME_SC_SUCCESS``
-  Successful Completion: The command
-  completed without error.
 
-``NVME_SC_INVALID_OPCODE``
-  Invalid Command Opcode: A reserved coded
-  value or an unsupported value in the command opcode field.
+.. c:function:: int nvme_namespace_attach_ctrls (int fd, __u32 nsid, __u16 num_ctrls, __u16 * ctrlist)
 
-``NVME_SC_INVALID_FIELD``
-  Invalid Field in Command: A reserved
-  coded value or an unsupported value in a defined field.
+   Attach namespace to controller(s)
 
-``NVME_SC_CMDID_CONFLICT``
-  Command ID Conflict: The command
-  identifier is already in use.
+**Parameters**
 
-``NVME_SC_DATA_XFER_ERROR``
-  Data Transfer Error: Transferring the
-  data or metadata associated with a command experienced an error.
+``int fd``
+  File descriptor of nvme device
 
-``NVME_SC_POWER_LOSS``
-  Commands Aborted due to Power Loss
-  Notification: Indicates that the command
-  was aborted due to a power loss
-  notification.
+``__u32 nsid``
+  Namespace ID to attach
 
-``NVME_SC_INTERNAL``
-  Internal Error: The command was not
-  completed successfully due to an internal error.
+``__u16 num_ctrls``
+  Number of controllers in ctrlist
 
-``NVME_SC_ABORT_REQ``
-  Command Abort Requested: The command was
-  aborted due to an Abort command being
-  received that specified the Submission
-  Queue Identifier and Command Identifier
-  of this command.
+``__u16 * ctrlist``
+  List of controller IDs to perform the attach action
 
-``NVME_SC_ABORT_QUEUE``
-  Command Aborted due to SQ Deletion: The
-  command was aborted due to a Delete I/O
-  Submission Queue request received for the
-  Submission Queue to which the command was
-  submitted.
+**Return**
 
-``NVME_SC_FUSED_FAIL``
-  Command Aborted due to Failed Fused Command:
-  The command was aborted due to the other
-  command in a fused operation failing.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-``NVME_SC_FUSED_MISSING``
-  Aborted due to Missing Fused Command: The
-  fused command was aborted due to the
-  adjacent submission queue entry not
-  containing a fused command that is the
-  other command.
 
-``NVME_SC_INVALID_NS``
-  Invalid Namespace or Format: The
-  namespace or the format of that namespace is invalid.
+.. c:function:: int nvme_namespace_detach_ctrls (int fd, __u32 nsid, __u16 num_ctrls, __u16 * ctrlist)
 
-``NVME_SC_CMD_SEQ_ERROR``
-  Command Sequence Error: The command was
-  aborted due to a protocol violation in a multi-command sequence.
+   Detach namespace from controller(s)
 
-``NVME_SC_SGL_INVALID_LAST``
-  Invalid SGL Segment Descriptor: The
-  command includes an invalid SGL Last Segment or SGL Segment descriptor.
+**Parameters**
 
-``NVME_SC_SGL_INVALID_COUNT``
-  Invalid Number of SGL Descriptors: There
-  is an SGL Last Segment descriptor or an
-  SGL Segment descriptor in a location
-  other than the last descriptor of a
-  segment based on the length indicated.
+``int fd``
+  File descriptor of nvme device
 
-``NVME_SC_SGL_INVALID_DATA``
-  Data SGL Length Invalid: This may occur
-  if the length of a Data SGL is too short.
-  This may occur if the length of a Data
-  SGL is too long and the controller does
-  not support SGL transfers longer than the
-  amount of data to be transferred as
-  indicated in the SGL Support field of the
-  Identify Controller data structure.
+``__u32 nsid``
+  Namespace ID to detach
 
-``NVME_SC_SGL_INVALID_METADATA``
-  Metadata SGL Length Invalid: This may
-  occur if the length of a Metadata SGL is
-  too short. This may occur if the length
-  of a Metadata SGL is too long and the
-  controller does not support SGL transfers
-  longer than the amount of data to be
-  transferred as indicated in the SGL
-  Support field of the Identify Controller
-  data structure.
+``__u16 num_ctrls``
+  Number of controllers in ctrlist
 
-``NVME_SC_SGL_INVALID_TYPE``
-  SGL Descriptor Type Invalid: The type of
-  an SGL Descriptor is a type that is not supported by the controller.
+``__u16 * ctrlist``
+  List of controller IDs to perform the detach action
 
-``NVME_SC_CMB_INVALID_USE``
-  Invalid Use of Controller Memory Buffer:
-  The attempted use of the Controller
-  Memory Buffer is not supported by the
-  controller.
+**Return**
 
-``NVME_SC_PRP_INVALID_OFFSET``
-  PRP Offset Invalid: The Offset field for
-  a PRP entry is invalid.
+The nvme command status if a response was received (see
+:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
 
-``NVME_SC_AWU_EXCEEDED``
-  Atomic Write Unit Exceeded: The length
-  specified exceeds the atomic write unit size.
 
-``NVME_SC_OP_DENIED``
-  Operation Denied: The command was denied
-  due to lack of access rights. Refer to
-  the appropriate security specification.
+.. c:function:: int nvme_get_feature_length (int fid, __u32 cdw11, __u32 * len)
 
-``NVME_SC_SGL_INVALID_OFFSET``
-  SGL Offset Invalid: The offset specified
-  in a descriptor is invalid. This may
-  occur when using capsules for data
-  transfers in NVMe over Fabrics
-  implementations and an invalid offset in
-  the capsule is specified.
+   Retreive the command payload length for a specific feature identifier
 
-``NVME_SC_HOSTID_FORMAT``
-  Host Identifier Inconsistent Format: The
-  NVM subsystem detected the simultaneous
-  use of 64- bit and 128-bit Host
-  Identifier values on different
-  controllers.
+**Parameters**
 
-``NVME_SC_KAT_EXPIRED``
-  Keep Alive Timer Expired: The Keep Alive
-  Timer expired.
+``int fid``
+  Feature identifier, see :c:type:`enum nvme_features_id <nvme_features_id>`.
 
-``NVME_SC_KAT_INVALID``
-  Keep Alive Timeout Invalid: The Keep
-  Alive Timeout value specified is invalid.
+``__u32 cdw11``
+  The cdw11 value may affect the transfer (only known fid is
+  ``NVME_FEAT_FID_HOST_ID``)
 
-``NVME_SC_CMD_ABORTED_PREMEPT``
-  Command Aborted due to Preempt and Abort:
-  The command was aborted due to a Reservation Acquire command.
+``__u32 * len``
+  On success, set to this features payload length in bytes.
 
-``NVME_SC_SANITIZE_FAILED``
-  Sanitize Failed: The most recent sanitize
-  operation failed and no recovery action has been successfully completed.
+**Return**
 
-``NVME_SC_SANITIZE_IN_PROGRESS``
-  Sanitize In Progress: The requested
-  function (e.g., command) is prohibited
-  while a sanitize operation is in
-  progress.
+0 on success, -1 with errno set to EINVAL if the function did not
+recognize :c:type:`fid`.
 
-``NVME_SC_SGL_INVALID_GRANULARITY``
-  SGL Data Block Granularity Invalid: The
-  Address alignment or Length granularity
-  for an SGL Data Block descriptor is
-  invalid.
 
-``NVME_SC_CMD_IN_CMBQ_NOT_SUPP``
-  Command Not Supported for Queue in CMB:
-  The implementation does not support
-  submission of the command to a Submission
-  Queue in the Controller Memory Buffer or
-  command completion to a Completion Queue
-  in the Controller Memory Buffer.
+.. c:function:: int nvme_get_directive_receive_length (enum nvme_directive_dtype dtype, enum nvme_directive_receive_doper doper, __u32 * len)
 
-``NVME_SC_NS_WRITE_PROTECTED``
-  Namespace is Write Protected: The command
-  is prohibited while the namespace is
-  write protected as a result of a change
-  in the namespace write protection state
-  as defined by the Namespace Write
-  Protection State Machine.
 
-``NVME_SC_CMD_INTERRUPTED``
-  Command Interrupted: Command processing
-  was interrupted and the controller is
-  unable to successfully complete the
-  command. The host should retry the
-  command.
+**Parameters**
 
-``NVME_SC_TRAN_TPORT_ERROR``
-  Transient Transport Error: A transient
-  transport error was detected. If the
-  command is retried on the same
-  controller, the command is likely to
-  succeed. A command that fails with a
-  transient transport error four or more
-  times should be treated as a persistent
-  transport error that is not likely to
-  succeed if retried on the same
-  controller.
+``enum nvme_directive_dtype dtype``
+  Directive type, see :c:type:`enum nvme_directive_dtype <nvme_directive_dtype>`
 
-``NVME_SC_LBA_RANGE``
-  LBA Out of Range: The command references
-  an LBA that exceeds the size of the namespace.
+``enum nvme_directive_receive_doper doper``
+  Directive receive operation, see :c:type:`enum nvme_directive_receive_doper <nvme_directive_receive_doper>`
 
-``NVME_SC_CAP_EXCEEDED``
-  Capacity Exceeded: Execution of the
-  command has caused the capacity of the
-  namespace to be exceeded.
+``__u32 * len``
+  On success, set to this directives payload length in bytes.
 
-``NVME_SC_NS_NOT_READY``
-  Namespace Not Ready: The namespace is not
-  ready to be accessed as a result of a
-  condition other than a condition that is
-  reported as an Asymmetric Namespace
-  Access condition.
+**Return**
 
-``NVME_SC_RESERVATION_CONFLICT``
-  Reservation Conflict: The command was
-  aborted due to a conflict with a
-  reservation held on the accessed
-  namespace.
+0 on success, -1 with errno set to EINVAL if the function did not
+recognize :c:type:`dtype` or :c:type:`doper`.
 
-``NVME_SC_FORMAT_IN_PROGRESS``
-  Format In Progress: A Format NVM command
-  is in progress on the namespace.
 
-``NVME_SC_CQ_INVALID``
-  Completion Queue Invalid: The Completion
-  Queue identifier specified in the command
-  does not exist.
+.. c:function:: int nvme_open (const char * name)
 
-``NVME_SC_QID_INVALID``
-  Invalid Queue Identifier: The creation of
-  the I/O Completion Queue failed due to an
-  invalid queue identifier specified as
-  part of the command. An invalid queue
-  identifier is one that is currently in
-  use or one that is outside the range
-  supported by the controller.
+   Open an nvme controller or namespace device
 
-``NVME_SC_QUEUE_SIZE``
-  Invalid Queue Size: The host attempted to
-  create an I/O Completion Queue with an
-  invalid number of entries.
+**Parameters**
 
-``NVME_SC_ABORT_LIMIT``
-  Abort Command Limit Exceeded: The number
-  of concurrently outstanding Abort commands has exceeded the limit indicated
-                                     in the Identify Controller data
-                                     structure.
+``const char * name``
+  The basename of the device to open
 
-``NVME_SC_ABORT_MISSING``
-  Abort Command is missing: The abort
-  command is missing.
+**Description**
 
-``NVME_SC_ASYNC_LIMIT``
-  Asynchronous Event Request Limit
-  Exceeded: The number of concurrently
-  outstanding Asynchronous Event Request
-  commands has been exceeded.
+This will look for the handle in /dev/ and validate the name and filetype
+match linux conventions.
 
-``NVME_SC_FIRMWARE_SLOT``
-  Invalid Firmware Slot: The firmware slot
-  indicated is invalid or read only. This
-  error is indicated if the firmware slot
-  exceeds the number supported.
+**Return**
 
-``NVME_SC_FIRMWARE_IMAGE``
-  Invalid Firmware Image: The firmware
-  image specified for activation is invalid
-  and not loaded by the controller.
+A file descriptor for the device on a successful open, or -1 with
+errno set otherwise.
 
-``NVME_SC_INVALID_VECTOR``
-  Invalid Interrupt Vector: The creation of
-  the I/O Completion Queue failed due to an
-  invalid interrupt vector specified as
-  part of the command.
 
-``NVME_SC_INVALID_LOG_PAGE``
-  Invalid Log Page: The log page indicated
-  is invalid. This error condition is also
-  returned if a reserved log page is
-  requested.
 
-``NVME_SC_INVALID_FORMAT``
-  Invalid Format: The LBA Format specified
-  is not supported.
 
-``NVME_SC_FW_NEEDS_CONV_RESET``
-  Firmware Activation Requires Conventional Reset:
-  The firmware commit was successful,
-  however, activation of the firmware image
-  requires a conventional reset.
+.. c:type:: struct nvme_fabrics_config
 
-``NVME_SC_INVALID_QUEUE``
-  Invalid Queue Deletion: Invalid I/O
-  Completion Queue specified to delete.
+   Defines all linux nvme fabrics initiator options
 
-``NVME_SC_FEATURE_NOT_SAVEABLE``
-  Feature Identifier Not Saveable: The
-  Feature Identifier specified does not
-  support a saveable value.
+**Definition**
 
-``NVME_SC_FEATURE_NOT_CHANGEABLE``
-  Feature Not Changeable: The Feature
-  Identifier is not able to be changed.
+::
 
-``NVME_SC_FEATURE_NOT_PER_NS``
-  Feature Not Namespace Specific: The
-  Feature Identifier specified is not
-  namespace specific. The Feature
-  Identifier settings apply across all
-  namespaces.
+  struct nvme_fabrics_config {
+    const char *transport;
+    const char *traddr;
+    const char *trsvcid;
+    const char *nqn;
+    const char *hostnqn;
+    const char *host_traddr;
+    const char *hostid;
+    int queue_size;
+    int nr_io_queues;
+    int reconnect_delay;
+    int ctrl_loss_tmo;
+    int keep_alive_tmo;
+    int nr_write_queues;
+    int nr_poll_queues;
+    int tos;
+    bool duplicate_connect;
+    bool disable_sqflow;
+    bool hdr_digest;
+    bool data_digest;
+  };
 
-``NVME_SC_FW_NEEDS_SUBSYS_RESET``
-  Firmware Activation Requires NVM
-  Subsystem Reset: The firmware commit was
-  successful, however, activation of the
-  firmware image requires an NVM Subsystem.
+**Members**
 
-``NVME_SC_FW_NEEDS_RESET``
-  Firmware Activation Requires Controller
-  Level Reset: The firmware commit was
-  successful; however, the image specified
-  does not support being activated without
-  a reset.
+``transport``
+  The fabric transport to use, either loop, fc, tcp, or rdma
 
-``NVME_SC_FW_NEEDS_MAX_TIME``
-  Firmware Activation Requires Maximum Time
-  Violation: The image specified if
-  activated immediately would exceed the
-  Maximum Time for Firmware Activation
-  (MTFA) value reported in Identify
-  Controller.
+``traddr``
+  Transport Address for the target, format specific to transport type
 
-``NVME_SC_FW_ACTIVATE_PROHIBITED``
-  Firmware Activation Prohibited: The image
-  specified is being prohibited from
-  activation by the controller for vendor
-  specific reasons.
+``trsvcid``
+  Transport Service Identifier, specific to the transport type
 
-``NVME_SC_OVERLAPPING_RANGE``
-  Overlapping Range: The downloaded
-  firmware image has overlapping ranges.
+``nqn``
+  Target NVMe Qualified Name
 
-``NVME_SC_NS_INSUFFICIENT_CAP``
-  Namespace Insufficient Capacity: Creating
-  the namespace requires more free space
-  than is currently available.
+``hostnqn``
+  Host NVMe Qualified Name
 
-``NVME_SC_NS_ID_UNAVAILABLE``
-  Namespace Identifier Unavailable: The
-  number of namespaces supported has been
-  exceeded.
+``host_traddr``
+  Host Transport Address
 
-``NVME_SC_NS_ALREADY_ATTACHED``
-  Namespace Already Attached: The
-  controller is already attached to the
-  namespace specified.
+``hostid``
+  Host Identifier
 
-``NVME_SC_NS_IS_PRIVATE``
-  Namespace Is Private: The namespace is
-  private and is already attached to one
-  controller.
+``queue_size``
+  Number of IO queue entries
 
-``NVME_SC_NS_NOT_ATTACHED``
-  Namespace Not Attached: The request to
-  detach the controller could not be completed because the controller is not
-  attached to the namespace.
+``nr_io_queues``
+  Number of controller IO queues to establish
 
-``NVME_SC_THIN_PROV_NOT_SUPP``
-  Thin Provisioning Not Supported: Thin
-  provisioning is not supported by the
-  controller.
+``reconnect_delay``
+  Time between two consecutive reconnect attempts.
 
-``NVME_SC_CTRL_LIST_INVALID``
-  Controller List Invalid: The controller
-  list provided contains invalid controller
-  ids.
+``ctrl_loss_tmo``
+  Override the default controller reconnect attempt timeout in seconds
 
-``NVME_SC_SELF_TEST_IN_PROGRESS``
-  Device Self-test In Progress:
+``keep_alive_tmo``
+  Override the default keep-alive-timeout to this value in seconds
 
-``NVME_SC_BP_WRITE_PROHIBITED``
-  Boot Partition Write Prohibited: The
-  command is trying to modify a locked Boot
-  Partition.
+``nr_write_queues``
+  Number of queues to use for exclusively for writing
 
-``NVME_SC_INVALID_CTRL_ID``
-  Invalid Controller Identifier:
+``nr_poll_queues``
+  Number of queues to reserve for polling completions
 
-``NVME_SC_INVALID_SEC_CTRL_STATE``
-  Invalid Secondary Controller State
+``tos``
+  Type of service
 
-``NVME_SC_INVALID_CTRL_RESOURCES``
-  Invalid Number of Controller Resources
+``duplicate_connect``
+  Allow multiple connections to the same target
 
-``NVME_SC_INVALID_RESOURCE_ID``
-  Invalid Resource Identifier
+``disable_sqflow``
+  Disable controller sq flow control
 
-``NVME_SC_PMR_SAN_PROHIBITED``
-  Sanitize Prohibited While Persistent
-  Memory Region is Enabled
+``hdr_digest``
+  Generate/verify header digest (TCP)
 
-``NVME_SC_ANA_GROUP_ID_INVALID``
-  ANA Group Identifier Invalid
+``data_digest``
+  Generate/verify data digest (TCP)
 
-``NVME_SC_ANA_ATTACH_FAILED``
-  ANA Attach Failed
 
-``NVME_SC_BAD_ATTRIBUTES``
-  Conflicting Dataset Management Attributes
 
-``NVME_SC_INVALID_PI``
-  Invalid Protection Information
+.. c:function:: int nvmf_add_ctrl_opts (struct nvme_fabrics_config * cfg)
 
-``NVME_SC_READ_ONLY``
-  Attempted Write to Read Only Range
 
-``NVME_SC_CONNECT_FORMAT``
-  Incompatible Format: The NVM subsystem
-  does not support the record format
-  specified by the host.
+**Parameters**
 
-``NVME_SC_CONNECT_CTRL_BUSY``
-  Controller Busy: The controller is
-  already associated with a host.
+``struct nvme_fabrics_config * cfg``
 
-``NVME_SC_CONNECT_INVALID_PARAM``
-  Connect Invalid Parameters: One or more
-  of the command parameters.
 
-``NVME_SC_CONNECT_RESTART_DISC``
-  Connect Restart Discovery: The NVM
-  subsystem requested is not available.
+.. c:function:: nvme_ctrl_t nvmf_add_ctrl (struct nvme_fabrics_config * cfg)
 
-``NVME_SC_CONNECT_INVALID_HOST``
-  Connect Invalid Host: The host is either
-  not allowed to establish an association
-  to any controller in the NVM subsystem or
-  the host is not allowed to establish an
-  association to the specified controller
 
-``NVME_SC_DISCONNECT_INVALID_QTYPE``
-  Invalid Queue Type: The command was sent
-  on the wrong queue type.
+**Parameters**
 
-``NVME_SC_DISCOVERY_RESTART``
-  Discover Restart: The snapshot of the
-  records is now invalid or out of date.
+``struct nvme_fabrics_config * cfg``
 
-``NVME_SC_AUTH_REQUIRED``
-  Authentication Required: NVMe in-band
-  authentication is required and the queue
-  has not yet been authenticated.
 
-``NVME_SC_WRITE_FAULT``
-  Write Fault: The write data could not be
-  committed to the media.
+.. c:function:: int nvmf_get_discovery_log (nvme_ctrl_t c, struct nvmf_discovery_log ** logp, int max_retries)
 
-``NVME_SC_READ_ERROR``
-  Unrecovered Read Error: The read data
-  could not be recovered from the media.
 
-``NVME_SC_GUARD_CHECK``
-  End-to-end Guard Check Error: The command
-  was aborted due to an end-to-end guard
-  check failure.
+**Parameters**
 
-``NVME_SC_APPTAG_CHECK``
-  End-to-end Application Tag Check Error:
-  The command was aborted due to an
-  end-to-end application tag check failure.
+``nvme_ctrl_t c``
+  *undescribed*
 
-``NVME_SC_REFTAG_CHECK``
-  End-to-end Reference Tag Check Error: The
-  command was aborted due to an end-to-end
-  reference tag check failure.
+``struct nvmf_discovery_log ** logp``
+  *undescribed*
 
-``NVME_SC_COMPARE_FAILED``
-  Compare Failure: The command failed due
-  to a miscompare during a Compare command.
+``int max_retries``
 
-``NVME_SC_ACCESS_DENIED``
-  Access Denied: Access to the namespace
-  and/or LBA range is denied due to lack of
-  access rights.
 
-``NVME_SC_UNWRITTEN_BLOCK``
-  Deallocated or Unwritten Logical Block:
-  The command failed due to an attempt to
-  read from or verify an LBA range
-  containing a deallocated or unwritten
-  logical block.
+.. c:function:: char * nvmf_hostnqn_generate ()
 
-``NVME_SC_ANA_INTERNAL_PATH_ERROR``
-  Internal Path Error: The command was not
-  completed as the result of a controller
-  internal error that is specific to the
-  controller processing the command.
+   Generate a machine specific host nqn
 
-``NVME_SC_ANA_PERSISTENT_LOSS``
-  Asymmetric Access Persistent Loss: The
-  requested function (e.g., command) is not
-  able to be performed as a result of the
-  relationship between the controller and
-  the namespace being in the ANA Persistent
-  Loss state.
+**Parameters**
 
-``NVME_SC_ANA_INACCESSIBLE``
-  Asymmetric Access Inaccessible: The
-  requested function (e.g., command) is not
-  able to be performed as a result of the
-  relationship between the controller and
-  the namespace being in the ANA
-  Inaccessible state.
+**Return**
 
-``NVME_SC_ANA_TRANSITION``
-  Asymmetric Access Transition: The
-  requested function (e.g., command) is not
-  able to be performed as a result of the
-  relationship between the controller and
-  the namespace transitioning between
-  Asymmetric Namespace Access states.
+An nvm namespace qualifieid name string based on the machine
+identifier, or NULL if not successful.
 
-``NVME_SC_CTRL_PATH_ERROR``
-  Controller Pathing Error: A pathing error
-  was detected by the controller.
 
-``NVME_SC_HOST_PATH_ERROR``
-  Host Pathing Error: A pathing error was
-  detected by the host.
+.. c:function:: char * nvmf_hostnqn_from_file ()
 
-``NVME_SC_CMD_ABORTED_BY_HOST``
-  Command Aborted By Host: The command was
-  aborted as a result of host action.
+   Reads the host nvm qualified name from the config default location in /etc/nvme/
 
-``NVME_SC_CRD``
-  Mask to get value of Command Retry Delay
-  index
+**Parameters**
 
-``NVME_SC_MORE``
-  More bit. If set, more status information
-  for this command as part of the Error
-  Information log that may be retrieved with
-  the Get Log Page command.
+**Return**
 
-``NVME_SC_DNR``
-  Do Not Retry bit. If set, if the same
-  command is re-submitted to any controller
-  in the NVM subsystem, then that
-  re-submitted command is expected to fail.
+The host nqn, or NULL if unsuccessful. If found, the caller
+is responsible to free the string.
 
 
-.. c:function:: __u16 nvme_status_code_type (__u16 status_field)
+.. c:function:: char * nvmf_hostid_from_file ()
 
-   Returns the NVMe Status Code Type
+   Reads the host identifier from the config default location in /etc/nvme/.
 
 **Parameters**
 
-``__u16 status_field``
-  The NVMe Completion Queue Entry's Status Field
-
-**Description**
+**Return**
 
-See :c:type:`enum nvme_status_field <nvme_status_field>`
+The host identifier, or NULL if unsuccessful. If found, the caller
+        is responsible to free the string.
 
 
-.. c:function:: __u16 nvme_status_code (__u16 status_field)
+.. c:function:: nvme_ctrl_t nvmf_connect_disc_entry (struct nvmf_disc_log_entry * e, const struct nvme_fabrics_config * defcfg, bool * discover)
 
-   Returns the NVMe Status Code
 
 **Parameters**
 
-``__u16 status_field``
-  The NVMe Completion Queue Entry's Status Field
+``struct nvmf_disc_log_entry * e``
+  *undescribed*
 
-**Description**
+``const struct nvme_fabrics_config * defcfg``
+  *undescribed*
 
-See :c:type:`enum nvme_status_field <nvme_status_field>`
+``bool * discover``
+
+**Return**
+
+An 
 
 
index 1ca4eb53e8f9bfc302a4c8611e0a39be46ea9899..d512cf3dabd48d5bfeb5d59684f1943d0c664a2b 100644 (file)
 #include "tree.h"
 
 /**
- * struct nvme_fabrics_config -
- * @transport:         
- * @traddr:            
- * @trsvcid:           
- * @nqn:               
- * @hostnqn:           
- * @host_traddr:       
- * @hostid:            
- * @queue_size:                
- * @nr_io_queues:      
- * @reconnect_delay:   
- * @ctrl_loss_tmo:     
- * @keep_alive_tmo:    
- * @nr_write_queues:   
- * @nr_poll_queues:    
- * @tos:               
- * @duplicate_connect: 
- * @disable_sqflow:    
- * @hdr_digest:                
- * @data_digest:       
- * @rsvd:              
+ * struct nvme_fabrics_config - Defines all linux nvme fabrics initiator options
+ * @transport:         The fabric transport to use, either loop, fc, tcp, or rdma
+ * @traddr:            Transport Address for the target, format specific to transport type
+ * @trsvcid:           Transport Service Identifier, specific to the transport type
+ * @nqn:               Target NVMe Qualified Name
+ * @hostnqn:           Host NVMe Qualified Name
+ * @host_traddr:       Host Transport Address
+ * @hostid:            Host Identifier
+ * @queue_size:                Number of IO queue entries
+ * @nr_io_queues:      Number of controller IO queues to establish
+ * @reconnect_delay:   Time between two consecutive reconnect attempts.
+ * @ctrl_loss_tmo:     Override the default controller reconnect attempt timeout in seconds
+ * @keep_alive_tmo:    Override the default keep-alive-timeout to this value in seconds
+ * @nr_write_queues:   Number of queues to use for exclusively for writing
+ * @nr_poll_queues:    Number of queues to reserve for polling completions
+ * @tos:               Type of service
+ * @duplicate_connect: Allow multiple connections to the same target
+ * @disable_sqflow:    Disable controller sq flow control
+ * @hdr_digest:                Generate/verify header digest (TCP)
+ * @data_digest:       Generate/verify data digest (TCP)
  */
 struct nvme_fabrics_config {
        const char *transport;
@@ -58,8 +57,6 @@ struct nvme_fabrics_config {
        bool disable_sqflow;
        bool hdr_digest;
        bool data_digest;
-
-       uint8_t rsvd[0x200];
 };
 
 /**
@@ -92,7 +89,7 @@ int nvmf_get_discovery_log(nvme_ctrl_t c, struct nvmf_discovery_log **logp,
 /**
  * nvmf_hostnqn_generate() - Generate a machine specific host nqn
  * Returns: An nvm namespace qualifieid name string based on the machine
- *         identifier, or NULL if not successful.
+ * identifier, or NULL if not successful.
  */
 char *nvmf_hostnqn_generate();
 
@@ -100,7 +97,7 @@ char *nvmf_hostnqn_generate();
  * nvmf_hostnqn_from_file() - Reads the host nvm qualified name from the config
  *                           default location in /etc/nvme/
  * Return: The host nqn, or NULL if unsuccessful. If found, the caller
- *        is responsible to free the string.
+ * is responsible to free the string.
  */
 char *nvmf_hostnqn_from_file();
 
@@ -118,7 +115,7 @@ char *nvmf_hostid_from_file();
  * @defcfg:
  * @discover:
  *
- * Return:
+ * Return: An 
  */
 nvme_ctrl_t nvmf_connect_disc_entry(struct nvmf_disc_log_entry *e,
        const struct nvme_fabrics_config *defcfg, bool *discover);
index 57ff36c4e45d77d04c52504590c99cb13d7d8d94..ae16b8dadf6d7c2ba6c352eb09a122839ffae29d 100644 (file)
@@ -132,7 +132,7 @@ struct nvme_passthru_cmd64 {
  * Uses NVME_IOCTL_ADMIN64_CMD for the ioctl request.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_submit_admin_passthru64(int fd, struct nvme_passthru_cmd64 *cmd,
                                 __u64 *result);
@@ -165,7 +165,7 @@ int nvme_submit_admin_passthru64(int fd, struct nvme_passthru_cmd64 *cmd,
  * Known values for @opcode are defined in &enum nvme_admin_opcode.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_admin_passthru64(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
                __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11,
@@ -182,7 +182,7 @@ int nvme_admin_passthru64(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
  * Uses NVME_IOCTL_ADMIN_CMD for the ioctl request.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_submit_admin_passthru(int fd, struct nvme_passthru_cmd *cmd,
                               __u32 *result);
@@ -215,7 +215,7 @@ int nvme_submit_admin_passthru(int fd, struct nvme_passthru_cmd *cmd,
  * Known values for @opcode are defined in &enum nvme_admin_opcode.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_admin_passthru(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
                __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11,
@@ -232,7 +232,7 @@ int nvme_admin_passthru(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
  * Uses NVME_IOCTL_IO64_CMD for the ioctl request.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_submit_io_passthru64(int fd, struct nvme_passthru_cmd64 *cmd,
                            __u64 *result);
@@ -265,7 +265,7 @@ int nvme_submit_io_passthru64(int fd, struct nvme_passthru_cmd64 *cmd,
  * Known values for @opcode are defined in &enum nvme_io_opcode.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_io_passthru64(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
                __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11,
@@ -283,7 +283,7 @@ int nvme_io_passthru64(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
  * Uses NVME_IOCTL_IO_CMD for the ioctl request.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_submit_io_passthru(int fd, struct nvme_passthru_cmd *cmd,
                            __u32 *result);
@@ -316,7 +316,7 @@ int nvme_submit_io_passthru(int fd, struct nvme_passthru_cmd *cmd,
  * Known values for @opcode are defined in &enum nvme_io_opcode.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_io_passthru(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
                __u32 nsid, __u32 cdw2, __u32 cdw3, __u32 cdw10, __u32 cdw11,
@@ -331,7 +331,7 @@ int nvme_io_passthru(int fd, __u8 opcode, __u8 flags, __u16 rsvd,
  * This should only be sent to controller handles, not to namespaces.
  *
  * Return: Zero if a subsystem reset was initiated or -1 with errno set
- *        otherwise.
+ * otherwise.
  */
 int nvme_subsystem_reset(int fd);
 
@@ -341,7 +341,7 @@ int nvme_subsystem_reset(int fd);
  *
  * This should only be sent to controller handles, not to namespaces.
  *
- * Return: Zero if a reset was initiated or -1 with errno set otherwise.
+ * Return: 0 if a reset was initiated or -1 with errno set otherwise.
  */
 int nvme_ctrl_reset(int fd);
 
@@ -351,7 +351,7 @@ int nvme_ctrl_reset(int fd);
  *
  * This should only be sent to controller handles, not to namespaces.
  *
- * Return: Zero if a rescan was initiated or -1 with errno set otherwise.
+ * Return: 0 if a rescan was initiated or -1 with errno set otherwise.
  */
 int nvme_ns_rescan(int fd);
 
@@ -362,7 +362,7 @@ int nvme_ns_rescan(int fd);
  * This should only be sent to namespace handles, not to controllers.
  *
  * Return: The namespace identifier if a succecssful or -1 with errno set
- *        otherwise.
+ * otherwise.
  */
 int nvme_get_nsid(int fd);
 
@@ -772,7 +772,7 @@ enum nvme_virt_mgmt_rt {
  * the NVM subsystem, the controller or the namespace(s).
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify(int fd, enum nvme_identify_cns cns, __u32 nsid,
                  __u16 cntid, __u16 nvmsetid, __u8 uuidx, void *data);
@@ -787,7 +787,7 @@ int nvme_identify(int fd, enum nvme_identify_cns cns, __u32 nsid,
  * See &struct nvme_id_ctrl for details on the data returned.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_ctrl(int fd, struct nvme_id_ctrl *id);
 
@@ -809,7 +809,7 @@ int nvme_identify_ctrl(int fd, struct nvme_id_ctrl *id);
  * See &struct nvme_id_ns for details on the structure returned.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_ns(int fd, __u32 nsid, struct nvme_id_ns *ns);
 
@@ -821,7 +821,7 @@ int nvme_identify_ns(int fd, __u32 nsid, struct nvme_id_ns *ns);
  * @ns:                User space destination address to transfer the data
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_allocated_ns(int fd, __u32 nsid, struct nvme_id_ns *ns);
 
@@ -838,7 +838,7 @@ int nvme_identify_allocated_ns(int fd, __u32 nsid, struct nvme_id_ns *ns);
  * See &struct nvme_ns_list for the definition of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_active_ns_list(int fd, __u32 nsid, struct nvme_ns_list *list);
 
@@ -855,7 +855,7 @@ int nvme_identify_active_ns_list(int fd, __u32 nsid, struct nvme_ns_list *list);
  * See &struct nvme_ns_list for the definition of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_allocated_ns_list(int fd, __u32 nsid,
                                    struct nvme_ns_list *list);
@@ -873,7 +873,7 @@ int nvme_identify_allocated_ns_list(int fd, __u32 nsid,
  * See &struct nvme_ctrl_list for a definition of the structure returned.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_ctrl_list(int fd, __u16 cntid,
                            struct nvme_ctrl_list *ctrlist);
@@ -892,7 +892,7 @@ int nvme_identify_ctrl_list(int fd, __u16 cntid,
  * See &struct nvme_ctrl_list for a definition of the structure returned.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1
+ * &enum nvme_status_field) or -1
  */
 int nvme_identify_nsid_ctrl_list(int fd, __u32 nsid, __u16 cntid,
                                 struct nvme_ctrl_list *ctrlist);
@@ -912,7 +912,7 @@ int nvme_identify_nsid_ctrl_list(int fd, __u32 nsid, __u16 cntid,
  * See &struct nvme_ns_id_desc for the definition of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_ns_descs(int fd, __u32 nsid, struct nvme_ns_id_desc *descs);
 
@@ -930,7 +930,7 @@ int nvme_identify_ns_descs(int fd, __u32 nsid, struct nvme_ns_id_desc *descs);
  * See &struct nvme_id_nvmset_list for the defintion of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_nvmset_list(int fd, __u16 nvmsetid,
                              struct nvme_id_nvmset_list *nvmset);
@@ -945,7 +945,7 @@ int nvme_identify_nvmset_list(int fd, __u16 nvmsetid,
  * See &struct nvme_primary_ctrl_cap for the defintion of the returned structure, @cap.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_primary_ctrl(int fd, __u16 cntid,
                               struct nvme_primary_ctrl_cap *cap);
@@ -965,7 +965,7 @@ int nvme_identify_primary_ctrl(int fd, __u16 cntid,
  * structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_secondary_ctrl_list(int fd, __u16 cntid,
                                      struct nvme_secondary_ctrl_list *list);
@@ -984,7 +984,7 @@ int nvme_identify_secondary_ctrl_list(int fd, __u16 cntid,
  * structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_ns_granularity(int fd, struct nvme_id_ns_granularity_list *list);
 
@@ -999,7 +999,7 @@ int nvme_identify_ns_granularity(int fd, struct nvme_id_ns_granularity_list *lis
  * See &struct nvme_id_uuid_list for the definition of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_identify_uuid(int fd, struct nvme_id_uuid_list *list);
 
@@ -1017,7 +1017,7 @@ int nvme_identify_uuid(int fd, struct nvme_id_uuid_list *list);
  * @log:   User space destination address to transfer the data
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log(int fd, enum nvme_cmd_get_log_lid lid, __u32 nsid, __u64 lpo,
                 __u8 lsp, __u16 lsi, bool rae, __u8 uuidx, __u32 len, void *log);
@@ -1034,7 +1034,7 @@ int nvme_get_log(int fd, enum nvme_cmd_get_log_lid lid, __u32 nsid, __u64 lpo,
  * particular command.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_error(int fd, unsigned nr_entries, bool rae,
                       struct nvme_error_log_page *log);
@@ -1054,7 +1054,7 @@ int nvme_get_log_error(int fd, unsigned nr_entries, bool rae,
  * the LPA field in the Identify Controller data structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_smart(int fd, __u32 nsid, bool rae, struct nvme_smart_log *log);
 
@@ -1069,7 +1069,7 @@ int nvme_get_log_smart(int fd, __u32 nsid, bool rae, struct nvme_smart_log *log)
  * string. The log page also indicates the active slot number.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_fw_slot(int fd, bool rae, struct nvme_firmware_slot *log);
 
@@ -1084,7 +1084,7 @@ int nvme_get_log_fw_slot(int fd, bool rae, struct nvme_firmware_slot *log);
  * added, or deleted.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_changed_ns_list(int fd, bool rae, struct nvme_ns_list *log);
 
@@ -1097,7 +1097,7 @@ int nvme_get_log_changed_ns_list(int fd, bool rae, struct nvme_ns_list *log);
  * and the effects of those commands on the state of the NVM subsystem.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_cmd_effects(int fd, struct nvme_cmd_effects_log *log);
 
@@ -1112,7 +1112,7 @@ int nvme_get_log_cmd_effects(int fd, struct nvme_cmd_effects_log *log);
  * self-test operations.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_device_self_test(int fd, struct nvme_self_test_log *log);
 
@@ -1132,7 +1132,7 @@ int nvme_get_log_create_telemetry_host(int fd, struct nvme_telemetry_log *log);
  * using the previously existing capture.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_telemetry_host(int fd, __u64 offset, __u32 len, void *log);
 
@@ -1161,7 +1161,7 @@ int nvme_get_log_telemetry_ctrl(int fd, bool rae, __u64 offset, __u32 len,
  * page.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_endurance_group(int fd, __u16 endgid,
                                 struct nvme_endurance_group_log *log);
@@ -1172,7 +1172,7 @@ int nvme_get_log_endurance_group(int fd, __u16 endgid,
  * @nvmsetid:
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_predictable_lat_nvmset(int fd, __u16 nvmsetid,
                                        struct nvme_nvmset_predictable_lat_log *log);
@@ -1210,7 +1210,7 @@ enum nvme_log_ana_lsp {
  * See &struct nvme_ana_rsp_hdr for the defintion of the returned structure.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_ana(int fd, enum nvme_log_ana_lsp lsp, bool rae, __u64 offset,
                     __u32 len, void *log);
@@ -1253,7 +1253,7 @@ int nvme_get_log_endurance_grp_evt(int fd, bool rae, __u32 offset, __u32 len,
  * records.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_discovery(int fd, bool rae, __u32 offset, __u32 len, void *log);
 
@@ -1275,7 +1275,7 @@ int nvme_get_log_reservation(int fd, bool rae,
  * estimates and information about the most recent sanitize operation.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_sanitize(int fd, bool rae,
                          struct nvme_sanitize_log_page *log);
@@ -1295,7 +1295,7 @@ int nvme_get_log_sanitize(int fd, bool rae,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features(int fd, __u8 fid, __u32 nsid, __u32 cdw11, __u32 cdw12,
                      bool save, __u8 uuidx, __u32 cdw15, __u32 data_len,
@@ -1308,7 +1308,7 @@ int nvme_set_features(int fd, __u8 fid, __u32 nsid, __u32 cdw11, __u32 cdw12,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_arbitration(int fd, __u8 ab, __u8 lpw, __u8 mpw,
                                  __u8 hpw, bool  save, __u32 *result);
@@ -1320,7 +1320,7 @@ int nvme_set_features_arbitration(int fd, __u8 ab, __u8 lpw, __u8 mpw,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_power_mgmt(int fd, __u8 ps, __u8 wh, bool save,
                                 __u32 *result);
@@ -1332,7 +1332,7 @@ int nvme_set_features_power_mgmt(int fd, __u8 ps, __u8 wh, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_lba_range(int fd, __u32 nsid, __u32 nr_ranges, bool save,
                                struct nvme_lba_range_type *data, __u32 *result);
@@ -1353,7 +1353,7 @@ enum nvme_feat_tmpthresh_thsel {
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_temp_thresh(int fd, __u16 tmpth, __u8 tmpsel,
                                  enum nvme_feat_tmpthresh_thsel thsel,
@@ -1366,7 +1366,7 @@ int nvme_set_features_temp_thresh(int fd, __u16 tmpth, __u8 tmpsel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_err_recovery(int fd, __u32 nsid, __u16 tler,
                                   bool dulbe, bool save, __u32 *result);
@@ -1379,7 +1379,7 @@ int nvme_set_features_err_recovery(int fd, __u32 nsid, __u16 tler,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_volatile_wc(int fd, bool wce, bool save,
                                  __u32 *result);
@@ -1391,7 +1391,7 @@ int nvme_set_features_volatile_wc(int fd, bool wce, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_irq_coalesce(int fd, __u8 thr, __u8 time,
                                   bool save, __u32 *result);
@@ -1403,7 +1403,7 @@ int nvme_set_features_irq_coalesce(int fd, __u8 thr, __u8 time,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_irq_config(int fd, __u16 iv, bool cd, bool save,
                                 __u32 *result);
@@ -1416,7 +1416,7 @@ int nvme_set_features_irq_config(int fd, __u16 iv, bool cd, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_write_atomic(int fd, bool dn, bool save,
                                   __u32 *result);
@@ -1448,7 +1448,7 @@ enum nvme_features_async_event_config_flags {
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_async_event(int fd, __u32 events, bool save,
                                  __u32 *result);
@@ -1461,7 +1461,7 @@ int nvme_set_features_async_event(int fd, __u32 events, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_auto_pst(int fd, bool apste, bool save,
                               struct nvme_feat_auto_pst *apst,
@@ -1474,7 +1474,7 @@ int nvme_set_features_auto_pst(int fd, bool apste, bool save,
  * @timestamp: The current timestamp value to assign to this this feature
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp);
 
@@ -1486,7 +1486,7 @@ int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp);
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_hctm(int fd, __u16 tmt2, __u16 tmt1, bool save,
                           __u32 *result);
@@ -1503,7 +1503,7 @@ int nvme_set_features_nopsc(int fd, bool noppme, bool save, __u32 *result);
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_rrl(int fd, __u8 rrl, __u16 nvmsetid, bool save,
                          __u32 *result);
@@ -1515,7 +1515,7 @@ int nvme_set_features_rrl(int fd, __u8 rrl, __u16 nvmsetid, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_plm_config(int fd, bool enable, __u16 nvmsetid,
                                 bool save, struct nvme_plm_config *data,
@@ -1536,7 +1536,7 @@ enum nvme_feat_plm_window_select {
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_plm_window(int fd, enum nvme_feat_plm_window_select sel,
                                 __u16 nvmsetid, bool save, __u32 *result);
@@ -1549,7 +1549,7 @@ int nvme_set_features_plm_window(int fd, enum nvme_feat_plm_window_select sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_lba_sts_interval(int fd, __u16 lsiri, __u16 lsipi,
                                       bool save, __u32 *result);
@@ -1561,7 +1561,7 @@ int nvme_set_features_lba_sts_interval(int fd, __u16 lsiri, __u16 lsipi,
  * @save:      Save value across power states
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_host_behavior(int fd, bool save,
                                    struct nvme_feat_host_behavior *data);
@@ -1573,7 +1573,7 @@ int nvme_set_features_host_behavior(int fd, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_sanitize(int fd, bool nodrm, bool save, __u32 *result);
 
@@ -1586,7 +1586,7 @@ int nvme_set_features_sanitize(int fd, bool nodrm, bool save, __u32 *result);
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_endurance_evt_cfg(int fd, __u16 endgid, __u8 egwarn,
                                        bool save, __u32 *result);
@@ -1598,7 +1598,7 @@ int nvme_set_features_endurance_evt_cfg(int fd, __u16 endgid, __u8 egwarn,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_sw_progress(int fd, __u8 pbslc, bool save,
                                  __u32 *result);
@@ -1611,7 +1611,7 @@ int nvme_set_features_sw_progress(int fd, __u8 pbslc, bool save,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_host_id(int fd, bool exhid, bool save, __u8 *hostid);
 
@@ -1631,7 +1631,7 @@ enum nvme_feat_resv_notify_flags {
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_resv_mask(int fd, __u32 mask, bool save, __u32 *result);
 
@@ -1642,7 +1642,7 @@ int nvme_set_features_resv_mask(int fd, __u32 mask, bool save, __u32 *result);
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_resv_persist(int fd, bool ptpl, bool save, __u32 *result);
 
@@ -1667,7 +1667,7 @@ enum nvme_feat_nswpcfg_state {
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_features_write_protect(int fd, enum nvme_feat_nswpcfg_state state,
                                    bool save, __u32 *result);
@@ -1685,7 +1685,7 @@ int nvme_set_features_write_protect(int fd, enum nvme_feat_nswpcfg_state state,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features(int fd, enum nvme_features_id fid, __u32 nsid,
                      enum nvme_get_features_sel sel, __u32 cdw11, __u8 uuidx,
@@ -1698,7 +1698,7 @@ int nvme_get_features(int fd, enum nvme_features_id fid, __u32 nsid,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_arbitration(int fd, enum nvme_get_features_sel sel,
                                  __u32 *result);
@@ -1710,7 +1710,7 @@ int nvme_get_features_arbitration(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_power_mgmt(int fd, enum nvme_get_features_sel sel,
                                 __u32 *result);
@@ -1722,7 +1722,7 @@ int nvme_get_features_power_mgmt(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_lba_range(int fd, enum nvme_get_features_sel sel,
                                struct nvme_lba_range_type *data,
@@ -1735,7 +1735,7 @@ int nvme_get_features_lba_range(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_temp_thresh(int fd, enum nvme_get_features_sel sel,
                                  __u32 *result);
@@ -1747,7 +1747,7 @@ int nvme_get_features_temp_thresh(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_err_recovery(int fd, enum nvme_get_features_sel sel,
                                   __u32 *result);
@@ -1759,7 +1759,7 @@ int nvme_get_features_err_recovery(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_volatile_wc(int fd, enum nvme_get_features_sel sel,
                                  __u32 *result);
@@ -1771,7 +1771,7 @@ int nvme_get_features_volatile_wc(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_num_queues(int fd, enum nvme_get_features_sel sel,
                                 __u32 *result);
@@ -1783,7 +1783,7 @@ int nvme_get_features_num_queues(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_irq_coalesce(int fd, enum nvme_get_features_sel sel,
                                   __u32 *result);
@@ -1795,7 +1795,7 @@ int nvme_get_features_irq_coalesce(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_irq_config(int fd, enum nvme_get_features_sel sel,
                                 __u16 iv, __u32 *result);
@@ -1807,7 +1807,7 @@ int nvme_get_features_irq_config(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_write_atomic(int fd, enum nvme_get_features_sel sel,
                                   __u32 *result);
@@ -1819,7 +1819,7 @@ int nvme_get_features_write_atomic(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_async_event(int fd, enum nvme_get_features_sel sel,
                                  __u32 *result);
@@ -1831,7 +1831,7 @@ int nvme_get_features_async_event(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_auto_pst(int fd, enum nvme_get_features_sel sel,
                               struct nvme_feat_auto_pst *apst, __u32 *result);
@@ -1843,7 +1843,7 @@ int nvme_get_features_auto_pst(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_host_mem_buf(int fd, enum nvme_get_features_sel sel,
                                   __u32 *result);
@@ -1855,7 +1855,7 @@ int nvme_get_features_host_mem_buf(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_timestamp(int fd, enum nvme_get_features_sel sel,
                                struct nvme_timestamp *ts);
@@ -1867,7 +1867,7 @@ int nvme_get_features_timestamp(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_kato(int fd, enum nvme_get_features_sel sel, __u32 *result);
 
@@ -1878,7 +1878,7 @@ int nvme_get_features_kato(int fd, enum nvme_get_features_sel sel, __u32 *result
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_hctm(int fd, enum nvme_get_features_sel sel, __u32 *result);
 
@@ -1889,7 +1889,7 @@ int nvme_get_features_hctm(int fd, enum nvme_get_features_sel sel, __u32 *result
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_nopsc(int fd, enum nvme_get_features_sel sel, __u32 *result);
 
@@ -1900,7 +1900,7 @@ int nvme_get_features_nopsc(int fd, enum nvme_get_features_sel sel, __u32 *resul
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_rrl(int fd, enum nvme_get_features_sel sel, __u32 *result);
 
@@ -1911,7 +1911,7 @@ int nvme_get_features_rrl(int fd, enum nvme_get_features_sel sel, __u32 *result)
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_plm_config(int fd, enum nvme_get_features_sel sel,
                                 __u16 nvmsetid, struct nvme_plm_config *data,
@@ -1924,7 +1924,7 @@ int nvme_get_features_plm_config(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_plm_window(int fd, enum nvme_get_features_sel sel,
        __u16 nvmsetid, __u32 *result);
@@ -1936,7 +1936,7 @@ int nvme_get_features_plm_window(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_lba_sts_interval(int fd, enum nvme_get_features_sel sel,
                                       __u32 *result);
@@ -1948,7 +1948,7 @@ int nvme_get_features_lba_sts_interval(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_host_behavior(int fd, enum nvme_get_features_sel sel,
                                    struct nvme_feat_host_behavior *data,
@@ -1961,7 +1961,7 @@ int nvme_get_features_host_behavior(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_sanitize(int fd, enum nvme_get_features_sel sel,
                                __u32 *result);
@@ -1973,7 +1973,7 @@ int nvme_get_features_sanitize(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_endurance_event_cfg(int fd, enum nvme_get_features_sel sel,
                                          __u16 endgid, __u32 *result);
@@ -1985,7 +1985,7 @@ int nvme_get_features_endurance_event_cfg(int fd, enum nvme_get_features_sel sel
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_sw_progress(int fd, enum nvme_get_features_sel sel,
                                  __u32 *result);
@@ -1997,7 +1997,7 @@ int nvme_get_features_sw_progress(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_host_id(int fd, enum nvme_get_features_sel sel,
                              bool exhid, __u32 len, __u8 *hostid);
@@ -2009,7 +2009,7 @@ int nvme_get_features_host_id(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_resv_mask(int fd, enum nvme_get_features_sel sel,
                                __u32 *result);
@@ -2021,7 +2021,7 @@ int nvme_get_features_resv_mask(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_resv_persist(int fd, enum nvme_get_features_sel sel,
                                   __u32 *result);
@@ -2034,7 +2034,7 @@ int nvme_get_features_resv_persist(int fd, enum nvme_get_features_sel sel,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_features_write_protect(int fd, __u32 nsid,
                                    enum nvme_get_features_sel sel,
@@ -2059,7 +2059,7 @@ int nvme_get_features_write_protect(int fd, __u32 nsid,
  * all namespaces or only the specific namespace associated with the command
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_format_nvm(int fd, __u32 nsid, __u8 lbaf,
                    enum nvme_cmd_format_mset mset,
@@ -2088,7 +2088,7 @@ int nvme_ns_mgmt(int fd, __u32 nsid, enum nvme_ns_mgmt_sel sel,
  * namespace to one or more controllers.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_ns_mgmt_create(int fd, struct nvme_id_ns *ns, __u32 *nsid,
                        __u32 timeout);
@@ -2103,7 +2103,7 @@ int nvme_ns_mgmt_create(int fd, struct nvme_id_ns *ns, __u32 *nsid,
  * attached.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_ns_mgmt_delete(int fd, __u32 nsid);
 
@@ -2155,7 +2155,7 @@ int nvme_ns_detach_ctrls(int fd, __u32 nsid, struct nvme_ctrl_list *ctrlist);
  * image.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_fw_download(int fd, __u32 offset, __u32 data_len, void *data);
 
@@ -2170,7 +2170,7 @@ int nvme_fw_download(int fd, __u32 offset, __u32 data_len, void *data);
  * Partitions.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise. The command
+ * &enum nvme_status_field) or -1 with errno set otherwise. The command
  *        status
  *        response may specify additional
  *        reset actions required to complete the commit process.
@@ -2200,7 +2200,7 @@ int nvme_fw_commit(int fd, __u8 slot, enum nvme_fw_commit_ca action, bool bpid);
  * specification.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_security_send(int fd, __u32 nsid, __u8 nssf, __u8 spsp0, __u8 spsp1,
                       __u8 secp, __u32 tl, __u32 data_len, void *data,
@@ -2220,7 +2220,7 @@ int nvme_security_send(int fd, __u32 nsid, __u8 nssf, __u8 spsp0, __u8 spsp1,
  * @result:    The command completion result from CQE dword0
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_security_receive(int fd, __u32 nsid, __u8 nssf, __u8 spsp0,
                          __u8 spsp1, __u8 secp, __u32 al, __u32 data_len,
@@ -2241,7 +2241,7 @@ int nvme_security_receive(int fd, __u32 nsid, __u8 nssf, __u8 spsp0,
  * Unrecoverable LBAs. Refer to the specification for action type descriptions.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_lba_status(int fd, __u32 nsid, __u64 slba, __u32 mndw, __u16 rl,
                        enum nvme_lba_status_atype atype,
@@ -2266,7 +2266,7 @@ int nvme_get_lba_status(int fd, __u32 nsid, __u64 slba, __u32 mndw, __u16 rl,
  * See the NVMe specification for more information.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_send(int fd, __u32 nsid, __u16 dspec,
                        enum nvme_directive_send_doper doper,
@@ -2279,7 +2279,7 @@ int nvme_directive_send(int fd, __u32 nsid, __u16 dspec,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_send_id_endir(int fd, __u32 nsid, bool endir,
                                 enum nvme_directive_dtype dtype,
@@ -2291,7 +2291,7 @@ int nvme_directive_send_id_endir(int fd, __u32 nsid, bool endir,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_send_stream_release_identifier(int fd, __u32 nsid,
                                                  __u16 stream_id);
@@ -2302,7 +2302,7 @@ int nvme_directive_send_stream_release_identifier(int fd, __u32 nsid,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_send_stream_release_resource(int fd, __u32 nsid);
 
@@ -2319,7 +2319,7 @@ int nvme_directive_send_stream_release_resource(int fd, __u32 nsid);
  * @result:    If successful, the CQE dword0 value
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_recv(int fd, __u32 nsid, __u16 dspec,
                        enum nvme_directive_receive_doper doper,
@@ -2332,7 +2332,7 @@ int nvme_directive_recv(int fd, __u32 nsid, __u16 dspec,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_recv_identify_parameters(int fd, __u32 nsid,
                                            struct nvme_id_directives *id);
@@ -2343,7 +2343,7 @@ int nvme_directive_recv_identify_parameters(int fd, __u32 nsid,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_recv_stream_parameters(int fd, __u32 nsid,
                                          struct nvme_streams_directive_params *parms);
@@ -2354,7 +2354,7 @@ int nvme_directive_recv_stream_parameters(int fd, __u32 nsid,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_recv_stream_status(int fd, __u32 nsid, unsigned nr_entries,
                                      struct nvme_streams_directive_status *id);
@@ -2365,7 +2365,7 @@ int nvme_directive_recv_stream_status(int fd, __u32 nsid, unsigned nr_entries,
  * @nsid:      Namespace ID
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_directive_recv_stream_allocate(int fd, __u32 nsid, __u16 nsr,
                                        __u32 *result);
@@ -2398,7 +2398,7 @@ enum nvme_fctype {
  * properties align to the PCI MMIO controller registers.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_set_property(int fd, int offset, __u64 value);
 
@@ -2412,7 +2412,7 @@ int nvme_set_property(int fd, int offset, __u64 value);
  * properties align to the PCI MMIO controller registers.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_property(int fd, int offset, __u64 *value);
 
@@ -2437,7 +2437,7 @@ int nvme_get_property(int fd, int offset, __u64 *value);
  * sanitize command does not indicate completion of the sanitize operation.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_sanitize_nvm(int fd, enum nvme_sanitize_sanact sanact, bool ause,
                      __u8 owpass, bool oipbp, bool nodas, __u32 ovrpat);
@@ -2460,7 +2460,7 @@ int nvme_sanitize_nvm(int fd, enum nvme_sanitize_sanact sanact, bool ause,
  * namespace, if present.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_dev_self_test(int fd, __u32 nsid, enum nvme_dst_stc stc);
 
@@ -2482,7 +2482,7 @@ int nvme_dev_self_test(int fd, __u32 nsid, enum nvme_dst_stc stc);
  *     - Setting the Online and Offline state for secondary controllers
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_virtual_mgmt(int fd, enum nvme_virt_mgmt_act act,
                      enum nvme_virt_mgmt_rt rt, __u16 cntlid, __u16 nr,
@@ -2527,7 +2527,7 @@ enum nvme_io_opcode {
  * cache be made non-volatile.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_flush(int fd, __u32 nsid);
 
@@ -2612,7 +2612,7 @@ enum nvme_io_dsm_flags {
  * @metadata:  Pointer to user address of the metadata buffer
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_read(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
              __u8 dsm, __u32 reftag, __u16 apptag, __u16 appmask,
@@ -2642,7 +2642,7 @@ int nvme_read(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
  * @metadata:  Pointer to user address of the metadata buffer
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_write(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
               __u8 dsm, __u16 dspec, __u32 reftag, __u16 apptag,
@@ -2671,7 +2671,7 @@ int nvme_write(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
  * @metadata:  Pointer to user address of the metadata buffer
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_compare(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
                 __u32 reftag, __u16 apptag, __u16 appmask, __u32 data_len,
@@ -2700,7 +2700,7 @@ int nvme_compare(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
  * to 0h until a write occurs to this LBA range.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_write_zeros(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
                     __u32 reftag, __u16 apptag, __u16 appmask);
@@ -2719,7 +2719,7 @@ int nvme_write_zeros(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
  * required.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_write_uncorrectable(int fd, __u32 nsid, __u64 slba, __u16 nlb);
 
@@ -2745,7 +2745,7 @@ int nvme_write_uncorrectable(int fd, __u32 nsid, __u64 slba, __u16 nlb);
  * data or metadata to the host.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_verify(int fd, __u32 nsid, __u64 slba, __u16 nlb, __u16 control,
                __u32 reftag, __u16 apptag, __u16 appmask);
@@ -2777,7 +2777,7 @@ enum nvme_dsm_attributes {
  * deallocate/unmap/trim those logical blocks.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_dsm(int fd, __u32 nsid, __u32 attrs, __u16 nr_ranges,
             struct nvme_dsm_range *dsm);
@@ -2828,7 +2828,7 @@ enum nvme_reservation_racqa {
  * reservation held on a namespace.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_resv_acquire(int fd, __u32 nsid, enum nvme_reservation_rtype rtype,
                      enum nvme_reservation_racqa racqa, bool iekey,
@@ -2873,7 +2873,7 @@ enum nvme_reservation_cptpl {
  * a reservation key.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_resv_register(int fd, __u32 nsid, enum nvme_reservation_rrega rrega,
                       enum nvme_reservation_cptpl cptpl, bool iekey,
@@ -2899,7 +2899,7 @@ enum nvme_reservation_rrela {
  * @crkey:     The current reservation key to release
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_resv_release(int fd, __u32 nsid, enum nvme_reservation_rtype rtype,
                      enum nvme_reservation_rrela rrela, bool iekey,
@@ -2918,7 +2918,7 @@ int nvme_resv_release(int fd, __u32 nsid, enum nvme_reservation_rtype rtype,
  * the returned structure, &struct nvme_reservation_status, for more details.
  *
  * Return: The nvme command status if a response was received (see
- *             &enum
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_resv_report(int fd, __u32 nsid, bool eds, __u32 len,
                     struct nvme_reservation_status *report);
index 129ecbd27f20599bbb16a228456040a11de6f57d..172196a0f4bc5c234d6e632ab0de52956f130000 100644 (file)
 extern const char *nvme_ctrl_sysfs_dir;
 extern const char *nvme_subsys_sysfs_dir;
 
+/**
+ *
+ */
 typedef struct nvme_ns *nvme_ns_t;
+
+/**
+ *
+ */
 typedef struct nvme_path *nvme_path_t;
+
+/**
+ *
+ */
 typedef struct nvme_ctrl *nvme_ctrl_t;
+
+/**
+ *
+ */
 typedef struct nvme_subsystem *nvme_subsystem_t;
+
+/**
+ *
+ */
 typedef struct nvme_root *nvme_root_t;
 
+/**
+ *
+ */
 typedef bool (*nvme_scan_filter_t)(nvme_subsystem_t);
 
 /**
index 1039a876288616a8a7c806240e079da91177d5db..2f817ad123922d291b0a0d3c133273b02c05d2cb 100644 (file)
@@ -286,7 +286,7 @@ enum nvme_psd_flags {
 };
 
 /**
- * enum nvme_psd_ps - Known values for &struct nvme_psd #ips and #aps. Use with
+ * enum nvme_psd_ps - Known values for &struct nvme_psd %ips and %aps. Use with
  *                   nvme_psd_power_scale() to extract the power scale field
  *                   to match this enum.
  * NVME_PSD_IPS_100_MICRO_WATT:        0.0001 watt scale
@@ -495,12 +495,12 @@ struct nvme_id_psd {
  *            temperature, in degrees Kelvin, that the host may request in the
  *            Thermal Management Temperature 1 field and Thermal Management
  *            Temperature 2 field of a Set Features command with the Feature
- *            Identifier field set to #NVME_FEAT_FID_HCTM.
+ *            Identifier field set to %NVME_FEAT_FID_HCTM.
  * @mxtmt:     Maximum Thermal Management Temperature indicates the maximum
  *            temperature, in degrees Kelvin, that the host may request in the
  *            Thermal Management Temperature 1 field and Thermal Management
  *            Temperature 2 field of the Set Features command with the Feature
- *            Identifier set to #NVME_FEAT_FID_HCTM.
+ *            Identifier set to %NVME_FEAT_FID_HCTM.
  * @sanicap:   Sanitize Capabilities, see &enum nvme_id_ctrl_sanicap
  * @hmminds:   Host Memory Buffer Minimum Descriptor Entry Size indicates the
  *            minimum usable size of a Host Memory Buffer Descriptor Entry in
@@ -1998,8 +1998,8 @@ struct nvme_self_test_log {
 /**
  * struct nvme_telemetry_log - Retrieve internal data specific to the
  *                            manufacturer.
- * @lpi:       Log Identifier, either #NVME_LOG_LID_TELEMETRY_HOST or
- *            #NVME_LOG_LID_TELEMETRY_CTRL
+ * @lpi:       Log Identifier, either %NVME_LOG_LID_TELEMETRY_HOST or
+ *            %NVME_LOG_LID_TELEMETRY_CTRL
  * @ieee:      IEEE OUI Identifier is the Organization Unique Identifier (OUI)
  *            for the controller vendor that is able to interpret the data.
  * @dalb1:     Telemetry Controller-Initiated Data Area 1 Last Block is
@@ -3268,12 +3268,12 @@ struct nvme_mi_vpd_hdr {
 /**
  * enum nvme_status_field - Defines all parts of the nvme status field: status
  *                         code, status code type, and additional flags.
- * @NVME_SCT_MASK:                   Mask to get the value of the Status Code Type
  * @NVME_SCT_GENERIC:                Generic errors applicable to multiple opcodes
  * @NVME_SCT_CMD_SPECIFIC:           Errors associated to a specific opcode
  * @NVME_SCT_MEDIA:                  Errors associated with media and data integrity
  * @NVME_SCT_PATH:                   Errors associated with the paths connection
  * @NVME_SCT_VS:                     Vendor specific errors
+ * @NVME_SCT_MASK:                   Mask to get the value of the Status Code Type
  * @NVME_SC_MASK:                    Mask to get the value of the status code.
  * @NVME_SC_SUCCESS:                 Successful Completion: The command
  *                                   completed without error.
@@ -3630,13 +3630,12 @@ enum nvme_status_field {
        /*
         * Status Code Type indicators
         */
-       NVME_SCT_MASK                   = 0x700,
-       NVME_SCT_SHIFT                  = 0x700,
        NVME_SCT_GENERIC                = 0x000,
        NVME_SCT_CMD_SPECIFIC           = 0x100,
        NVME_SCT_MEDIA                  = 0x200,
        NVME_SCT_PATH                   = 0x300,
        NVME_SCT_VS                     = 0x700,
+       NVME_SCT_MASK                   = 0x700,
 
        /*
         * Status Code inidicators
index 62298c0af256dff5973952e3f3dc5697553c4c09..88f99d99358e8022cda0b8006c3cc2b9a61afbc6 100644 (file)
@@ -17,7 +17,7 @@
  * @fabrics: Set to true if &status is to a fabrics target.
  *
  * Return: An errno representing the nvme status if it is an nvme status field,
- *        or unchanged status is < 0 since errno is already set.
+ * or unchanged status is < 0 since errno is already set.
  */
 __u8 nvme_status_to_errno(int status, bool fabrics);
 
@@ -30,7 +30,7 @@ __u8 nvme_status_to_errno(int status, bool fabrics);
  * @buf:    Address of buffer containing all or part of the firmware image.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_fw_download_seq(int fd, __u32 size, __u32 xfer, __u32 offset,
                         void *buf);
@@ -45,7 +45,7 @@ int nvme_fw_download_seq(int fd, __u32 size, __u32 xfer, __u32 offset,
  *   (&struct nvme_telemetry_log.dalb3 + 1) * %NVME_LOG_TELEM_BLOCK_SIZE.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_ctrl_telemetry(int fd, bool rae, struct nvme_telemetry_log **log);
 
@@ -58,7 +58,7 @@ int nvme_get_ctrl_telemetry(int fd, bool rae, struct nvme_telemetry_log **log);
  *   (&struct nvme_telemetry_log.dalb3 + 1) * %NVME_LOG_TELEM_BLOCK_SIZE.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_host_telemetry(int fd,  struct nvme_telemetry_log **log);
 
@@ -71,7 +71,7 @@ int nvme_get_host_telemetry(int fd,  struct nvme_telemetry_log **log);
  *   (&struct nvme_telemetry_log.dalb3 + 1) * %NVME_LOG_TELEM_BLOCK_SIZE.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_new_host_telemetry(int fd,  struct nvme_telemetry_log **log);
 
@@ -116,7 +116,7 @@ void nvme_init_ctrl_list(struct nvme_ctrl_list *cntlist, __u16 num_ctrls,
  * used with constructing a payload for &nvme_dsm().
  *
  * Return: The nvme command status if a response was received or -errno
- *        otherwise.
+ * otherwise.
  */
 void nvme_init_dsm_range(struct nvme_dsm_range *dsm, __u32 *ctx_attrs,
                          __u32 *llbas, __u64 *slbas, __u16 nr_ranges);
@@ -132,7 +132,7 @@ void nvme_init_dsm_range(struct nvme_dsm_range *dsm, __u32 *ctx_attrs,
  * @data:     User address of at least &data_len to store the log.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int __nvme_get_log_page(int fd, __u32 nsid, __u8 log_id, bool rae,
                        __u32 xfer_len, __u32 data_len, void *data);
@@ -150,7 +150,7 @@ int __nvme_get_log_page(int fd, __u32 nsid, __u8 log_id, bool rae,
  * guarnateed by the protocol to be a safe transfer size.
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_log_page(int fd, __u32 nsid, __u8 log_id, bool rae,
                      __u32 data_len, void *data);
@@ -161,7 +161,7 @@ int nvme_get_log_page(int fd, __u32 nsid, __u8 log_id, bool rae,
  * @analen:    Pointer to where the length will be set on success
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_get_ana_log_len(int fd, size_t *analen);
 
@@ -173,7 +173,7 @@ int nvme_get_ana_log_len(int fd, size_t *analen);
  * @ctrlist:   List of controller IDs to perform the attach action
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_namespace_attach_ctrls(int fd, __u32 nsid, __u16 num_ctrls, __u16 *ctrlist);
 
@@ -185,7 +185,7 @@ int nvme_namespace_attach_ctrls(int fd, __u32 nsid, __u16 num_ctrls, __u16 *ctrl
  * @ctrlist:   List of controller IDs to perform the detach action
  *
  * Return: The nvme command status if a response was received (see
- *        &enum nvme_status_field) or -1 with errno set otherwise.
+ * &enum nvme_status_field) or -1 with errno set otherwise.
  */
 int nvme_namespace_detach_ctrls(int fd, __u32 nsid, __u16 num_ctrls, __u16 *ctrlist);
 
@@ -198,7 +198,7 @@ int nvme_namespace_detach_ctrls(int fd, __u32 nsid, __u16 num_ctrls, __u16 *ctrl
  * @len:   On success, set to this features payload length in bytes.
  *
  * Return: 0 on success, -1 with errno set to EINVAL if the function did not
- *        recognize &fid.
+ * recognize &fid.
  */
 int nvme_get_feature_length(int fid, __u32 cdw11, __u32 *len);
 
@@ -209,7 +209,7 @@ int nvme_get_feature_length(int fid, __u32 cdw11, __u32 *len);
  * @len:   On success, set to this directives payload length in bytes.
  *
  * Return: 0 on success, -1 with errno set to EINVAL if the function did not
- *        recognize &dtype or &doper.
+ * recognize &dtype or &doper.
  */
 int nvme_get_directive_receive_length(enum nvme_directive_dtype dtype,
                enum nvme_directive_receive_doper doper, __u32 *len);
@@ -222,7 +222,7 @@ int nvme_get_directive_receive_length(enum nvme_directive_dtype dtype,
  * match linux conventions.
  *
  * Return: A file descriptor for the device on a successful open, or -1 with
- *        errno set otherwise.
+ * errno set otherwise.
  */
 int nvme_open(const char *name);