/**
* nvme_identify_primary_ctrl() - Retrieve NVMe Primary Controller
* identification
- * &fd:
- * @cntid:
- * @cap:
+ * @fd: File descriptor of nvme device
+ * @cntid: Return controllers starting at this identifier
+ * @cap: User space destination buffer address to transfer the data
*
* See &struct nvme_primary_ctrl_cap for the defintion of the returned structure, @cap.
*
/**
* nvme_get_log() - NVMe Admin Get Log command
- * @fd: File descriptor of nvme device
- * @lid: Log page identifier, see &enum nvme_cmd_get_log_lid for known values
- * @nsid: Namespace identifier, if applicable
- * @lpo: Log page offset for partial log transfers
+ * @fd: File descriptor of nvme device
+ * @lid: Log page identifier, see &enum nvme_cmd_get_log_lid for known
+ * values
+ * @nsid: Namespace identifier, if applicable
+ * @lpo: Log page offset for partial log transfers
* @lsp: Log specific field
* @lsi: Endurance group information
* @rae: Retain asynchronous events
* @rae: Retain asynchronous events
* @err_log: Array of error logs of size 'entries'
*
- * This log page is used to describe extended error information for a command
- * that completed with error, or may report an error that is not specific to a
+ * This log page describes extended error information for a command that
+ * completed with error, or may report an error that is not specific to a
* particular command.
*
* Return: The nvme command status if a response was received (see
* @rae: Retain asynchronous events
* @smart_log: User address to store the smart log
*
- * This log page is used to provide SMART and general health information. The
- * information provided is over the life of the controller and is retained
- * across power cycles. To request the controller log page, the namespace
- * identifier specified is FFFFFFFFh. The controller may also support
- * requesting the log page on a per namespace basis, as indicated by bit 0 of
- * the LPA field in the Identify Controller data structure.
+ * This log page provides SMART and general health information. The information
+ * provided is over the life of the controller and is retained across power
+ * cycles. To request the controller log page, the namespace identifier
+ * specified is FFFFFFFFh. The controller may also support requesting the log
+ * page on a per namespace basis, as indicated by bit 0 of 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.
* @rae: Retain asynchronous events
* @fw_log: User address to store the log page
*
- * This log page is used to describe the firmware revision stored in each
- * firmware slot supported. The firmware revision is indicated as an ASCII
- * string. The log page also indicates the active slot number.
+ * This log page describes the firmware revision stored in each firmware slot
+ * supported. The firmware revision is indicated as an ASCII 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.
* @rae: Retain asynchronous events
* @ns_list: User address to store the log page
*
- * This log page is used to describe namespaces attached to this controller
- * that have changed since the last time the namespace was identified, been
- * added, or deleted.
+ * This log page describes namespaces attached to this controller that have
+ * changed since the last time the namespace was identified, been added, or
+ * deleted.
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise.
* @fd: File descriptor of nvme device
* @effects_log:User address to store the effects log
*
- * This log page is used to describe the commands that the controller supports
- * and the effects of those commands on the state of the NVM subsystem.
+ * This log page describes the commands that the controller supports 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.
* @nsid: Namespace ID being tested
* @log: Userspace address of the log payload
*
- * The log page is used to indicate the status of an in progress self test and
- * the percent complete of that operation, and the results of the previous 20
+ * The log page indicates the status of an in progress self test and the
+ * percent complete of that operation, and the results of the previous 20
* self-test operations.
*
* Return: The nvme command status if a response was received (see
* @rae: Retain asynchronous events
* @log: User address to store the sanitize log
*
- * The Sanitize Status log page is used to report sanitize operation time
- * estimates and information about the most recent sanitize operation.
+ * The Sanitize Status log page reports sanitize operation time 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.
int nvme_set_features_lba_range(int fd, __u32 nsid, __u32 nr_ranges, bool save,
struct nvme_lba_range_type *data, __u32 *result);
-
/**
* enum nvme_feat_tmpthresh_thsel -
*/
int nvme_set_features_err_recovery(int fd, __u32 nsid, __u16 tler,
bool dulbe, bool save, __u32 *result);
-
/**
* nvme_set_features_volatile_wc() -
* @fd: File descriptor of nvme device
int nvme_set_features_irq_config(int fd, __u16 iv, bool cd, bool save,
__u32 *result);
-
/**
* nvme_set_features_write_atomic() -
* @fd: File descriptor of nvme device
int nvme_set_features_async_event(int fd, __u32 events, bool save,
__u32 *result);
-
/**
* nvme_set_features_auto_pst() -
* @fd: File descriptor of nvme device
*/
int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp);
-
/**
* nvme_set_features_hctm() -
* @fd: File descriptor of nvme device
/**
* nvme_set_features_nopsc() -
+ * @fd: File descriptor of nvme device
+ * @save: Save value across power states
+ * @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.
*/
int nvme_set_features_nopsc(int fd, bool noppme, bool save, __u32 *result);
int nvme_set_features_plm_window(int fd, enum nvme_feat_plm_window_select sel,
__u16 nvmsetid, bool save, __u32 *result);
-
/**
* nvme_set_features_lba_sts_interval() -
* @fd: File descriptor of nvme device
int nvme_set_features_lba_sts_interval(int fd, __u16 lsiri, __u16 lsipi,
bool save, __u32 *result);
-
/**
* nvme_set_features_host_behavior() -
* @fd: File descriptor of nvme device
* @save: Save value across power states
+ * @data:
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise.
/**
* nvme_set_features_sanitize() -
* @fd: File descriptor of nvme device
+ * @nodrm:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
/**
* nvme_set_features_sw_progress() -
* @fd: File descriptor of nvme device
+ * @pbslc:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
/**
* nvme_set_features_host_id() -
* @fd: File descriptor of nvme device
+ * @exhid:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
/**
* nvme_set_features_resv_mask() -
* @fd: File descriptor of nvme device
+ * @mask:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
/**
* nvme_set_features_resv_persist() -
* @fd: File descriptor of nvme device
+ * @ptpl:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
/**
* nvme_set_features_write_protect() -
* @fd: File descriptor of nvme device
+ * @stat:
* @save: Save value across power states
* @result: The command completion result from CQE dword0
*
* @timeout: Set to override default timeout to this value in milliseconds;
* useful for long running formats. 0 will use system default.
*
- * The Format NVM command is used to low level format the NVM media. This
- * command is used by the host to change the LBA data size and/or metadata
- * size. A low level format may destroy all data and metadata associated with
- * all namespaces or only the specific namespace associated with the command
+ * The Format NVM command low level formats the NVM media. This command is used
+ * by the host to change the LBA data size and/or metadata size. A low level
+ * format may destroy all data and metadata associated with 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.
* @data_len: Length of data in this command in bytes
* @data: Userspace address of the firmware data
*
- * The Firmware Image Download command is used to download all or a portion of
- * an image for a future update to the controller. The Firmware Image Download
- * command downloads a new image (in whole or in part) to the controller.
+ * The Firmware Image Download command downloads all or a portion of an image
+ * for a future update to the controller. The Firmware Image Download command
+ * downloads a new image (in whole or in part) to the controller.
*
* The image may be constructed of multiple pieces that are individually
* downloaded with separate Firmware Image Download commands. Each Firmware
* @action: Action to use for the firmware image, see &enum nvme_fw_commit_ca
* @bpid: Set to true to select the boot partition id
*
- * The Firmware Commit command is used to modify the firmware image or Boot
- * Partitions.
+ * The Firmware Commit command modifies the firmware image or Boot Partitions.
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise. The command
* @data: Security data payload to send
* @result: The command completion result from CQE dword0
*
- * The Security Send command is used to transfer security protocol data to the
+ * The Security Send command transfers security protocol data to the
* controller. The data structure transferred to the controller as part of this
* command contains security protocol specific commands to be performed by the
* controller. The data structure transferred may also contain data or
* @result: If successful, the CQE dword0 value
*
* Directives is a mechanism to enable host and NVM subsystem or controller
- * information exchange. The Directive Send command is used to transfer data
- * related to a specific Directive Type from the host to the controller.
+ * information exchange. The Directive Send command transfers data related to a
+ * specific Directive Type from the host to the controller.
*
* See the NVMe specification for more information.
*
* recovery of any previous user data from any cache, the non-volatile media,
* or any Controller Memory Buffer is not possible.
*
- * The Sanitize command is used to start a sanitize operation or to recover
- * from a previously failed sanitize operation. The sanitize operation types
- * that may be supported are Block Erase, Crypto Erase, and Overwrite. All
- * sanitize operations are processed in the background, i.e., completion of the
- * sanitize command does not indicate completion of the sanitize operation.
+ * The Sanitize command starts a sanitize operation or to recover from a
+ * previously failed sanitize operation. The sanitize operation types that may
+ * be supported are Block Erase, Crypto Erase, and Overwrite. All sanitize
+ * operations are processed in the background, i.e., completion of the 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.
* @nsid: Namespace ID to test
* @stc: Self test code, see &enum nvme_dst_stc
*
- * The Device Self-test command is used to start a device self-test operation
- * or abort a device self-test operation. A device self-test operation is a
- * diagnostic testing sequence that tests the integrity and functionality of
- * the controller and may include testing of the media associated with
- * namespaces. The controller may return a response to this command immediately
- * while running the self-test in the background.
+ * The Device Self-test command starts a device self-test operation or abort a
+ * device self-test operation. A device self-test operation is a diagnostic
+ * testing sequence that tests the integrity and functionality of the
+ * controller and may include testing of the media associated with namespaces.
+ * The controller may return a response to this command immediately while
+ * running the self-test in the background.
*
* Set the 'nsid' field to 0 to not include namepsaces in the test. Set to
* 0xffffffff to test all namespaces. All other values tests a specific
* @fd: File descriptor of nvme device
* @nsid: Namespace identifier
*
- * The Flush command is used to request that the contents of volatile write
- * cache be made non-volatile.
+ * The Flush command requests that the contents of volatile write 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.
* only if the namespace is formatted to use end-to-end protection
* information.
*
- * The Write Zeroes command is used to set a range of logical blocks to zero.
- * After successful completion of this command, the value returned by
- * subsequent reads of logical blocks in this range shall be all bytes cleared
- * to 0h until a write occurs to this LBA range.
+ * The Write Zeroes command sets a range of logical blocks to zero. After
+ * successful completion of this command, the value returned by subsequent
+ * reads of logical blocks in this range shall be all bytes cleared 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.
* @slba: Starting logical block
* @nlb: Number of logical blocks to invalidate (0's based value)
*
- * The Write Uncorrectable command is used to mark a range of logical blocks as
- * invalid. When the specified logical block(s) are read after this operation,
- * a failure is returned with Unrecovered Read Error status. To clear the
- * invalid logical block status, a write operation on those logical blocks is
- * required.
+ * The Write Uncorrectable command marks a range of logical blocks as invalid.
+ * When the specified logical block(s) are read after this operation, a failure
+ * is returned with Unrecovered Read Error status. To clear the invalid logical
+ * block status, a write operation on those logical blocks is required.
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise.
struct nvme_dsm_range *dsm);
/**
- * enum nvme_reservation_rtype -
+ * enum nvme_resv_rtype -
* @NVME_RESERVATION_RTYPE_WE:
* @NVME_RESERVATION_RTYPE_EA:
* @NVME_RESERVATION_RTYPE_WERO:
* @NVME_RESERVATION_RTYPE_WEAR:
* @NVME_RESERVATION_RTYPE_EAAR:
*/
-enum nvme_reservation_rtype {
+enum nvme_resv_rtype {
NVME_RESERVATION_RTYPE_WE = 1,
NVME_RESERVATION_RTYPE_EA = 2,
NVME_RESERVATION_RTYPE_WERO = 3,
};
/**
- * enum nvme_reservation_racqa -
+ * enum nvme_resv_racqa -
* @NVME_RESERVATION_RACQA_ACQUIRE:
* @NVME_RESERVATION_RACQA_PREEMPT:
* @NVME_RESERVATION_RACQA_PREEMPT_AND_ABORT:
*/
-enum nvme_reservation_racqa {
+enum nvme_resv_racqa {
NVME_RESERVATION_RACQA_ACQUIRE = 0,
NVME_RESERVATION_RACQA_PREEMPT = 1,
NVME_RESERVATION_RACQA_PREEMPT_AND_ABORT = 2,
* nvme_resv_acquire() - Send an nvme reservation acquire
* @fd: File descriptor of nvme device
* @nsid: Namespace identifier
- * @rtype: The type of reservation to be create, see &enum nvme_reservation_rtype
- * @racqa: The action that is performed by the command, see &enum nvme_reservation_racqa
+ * @rtype: The type of reservation to be create, see &enum nvme_resv_rtype
+ * @racqa: The action that is performed by the command, see &enum nvme_resv_racqa
* @iekey: Set to ignore the existing key
* @crkey: The current reservation key associated with the host
* @nrkey: The reservation key to be unregistered from the namespace if
* the action is preempt
*
- * The Reservation Acquire command is used to acquire a reservation on a
- * namespace, preempt a reservation held on a namespace, and abort a
- * reservation held on a namespace.
+ * The Reservation Acquire command acquires a reservation on a namespace,
+ * preempt a reservation held on a namespace, and abort a 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.
*/
-int nvme_resv_acquire(int fd, __u32 nsid, enum nvme_reservation_rtype rtype,
- enum nvme_reservation_racqa racqa, bool iekey,
+int nvme_resv_acquire(int fd, __u32 nsid, enum nvme_resv_rtype rtype,
+ enum nvme_resv_racqa racqa, bool iekey,
__u64 crkey, __u64 nrkey);
/**
- * enum nvme_reservation_rrega -
+ * enum nvme_resv_rrega -
* @NVME_RESERVATION_RREGA_REGISTER_KEY:
* @NVME_RESERVATION_RREGA_UNREGISTER_KEY:
* @NVME_RESERVATION_RREGA_REPLACE_KEY:
*/
-enum nvme_reservation_rrega {
+enum nvme_resv_rrega {
NVME_RESERVATION_RREGA_REGISTER_KEY = 0,
NVME_RESERVATION_RREGA_UNREGISTER_KEY = 1,
NVME_RESERVATION_RREGA_REPLACE_KEY = 2,
};
/**
- * enum nvme_reservation_cptpl -
+ * enum nvme_resv_cptpl -
* @NVME_RESERVATION_CPTPL_NO_CHANGE:
* @NVME_RESERVATION_CPTPL_CLEAR:
* @NVME_RESERVATION_CPTPL_PERSIST:
*/
-enum nvme_reservation_cptpl {
+enum nvme_resv_cptpl {
NVME_RESERVATION_CPTPL_NO_CHANGE = 0,
NVME_RESERVATION_CPTPL_CLEAR = 2,
NVME_RESERVATION_CPTPL_PERSIST = 3,
* nvme_resv_register() - Send an nvme reservation register
* @fd: File descriptor of nvme device
* @nsid: Namespace identifier
- * @rrega: The registration action, see &enum nvme_reservation_rrega
- * @cptpl: Change persist through power loss, see &enum nvme_reservation_cptpl
+ * @rrega: The registration action, see &enum nvme_resv_rrega
+ * @cptpl: Change persist through power loss, see &enum nvme_resv_cptpl
* @iekey: Set to ignore the existing key
* @crkey: The current reservation key associated with the host
* @nrkey: The new reservation key to be register if action is register or
* replace
*
- * The Reservation Register command is used to register, unregister, or replace
- * a reservation key.
+ * The Reservation Register command registers, unregisters, or replaces a
+ * reservation key.
*
* Return: The nvme command status if a response was received (see
* &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,
+int nvme_resv_register(int fd, __u32 nsid, enum nvme_resv_rrega rrega,
+ enum nvme_resv_cptpl cptpl, bool iekey,
__u64 crkey, __u64 nrkey);
/**
- * enum nvme_reservation_rrela -
+ * enum nvme_resv_rrela -
* @NVME_RESERVATION_RRELA_RELEASE:
* @NVME_RESERVATION_RRELA_CLEAR:
*/
-enum nvme_reservation_rrela {
+enum nvme_resv_rrela {
NVME_RESERVATION_RRELA_RELEASE = 0,
NVME_RESERVATION_RRELA_CLEAR = 1
};
* nvme_resv_release() - Send an nvme reservation release
* @fd: File descriptor of nvme device
* @nsid: Namespace identifier
- * @rtype: The type of reservation to be create, see &enum nvme_reservation_rtype
- * @rrela: Reservation releast action, see &enum nvme_reservation_rrela
+ * @rtype: The type of reservation to be create, see &enum nvme_resv_rtype
+ * @rrela: Reservation releast action, see &enum nvme_resv_rrela
* @iekey: Set to ignore the existing key
* @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.
*/
-int nvme_resv_release(int fd, __u32 nsid, enum nvme_reservation_rtype rtype,
- enum nvme_reservation_rrela rrela, bool iekey,
+int nvme_resv_release(int fd, __u32 nsid, enum nvme_resv_rtype rtype,
+ enum nvme_resv_rrela rrela, bool iekey,
__u64 crkey);
/**
* &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);
+ struct nvme_resv_status *report);
#endif /* _LIBNVME_IOCTL_H */
#define __force
#endif
+/**
+ * NVME_GET() - extract field from complex value
+ * @name: The name of the sub-field within an nvme value
+ * @value: The original value of a complex field
+ *
+ * By convention, this library defines _SHIFT and _MASK such that mask can be
+ * applied after the shift to isolate a specific set of bits that decode to a
+ * sub-field.
+ *
+ * Returns: The 'name' field from 'value'
+ */
+#define NVME_GET(name, value) \
+ (((value) >> NVME_##name##_SHIFT) & NVME_##name##_MASK)
+
/**
* cpu_to_le16() -
* @x: 16-bit CPU value to turn to little endian.
* namespaces
* @NVME_NSID_NONE: The invalid namespace id, for when the nsid
* parameter is not used in a command
- * @NVME_UUID_NONE: Use to omit the uuid command parameter
- * @NVME_CNTLID_NONE: Use to omit the cntlid command parameter
- * @NVME_NVMSETID_NONE: Use to omit the nvmsetid command parameter
- * @NVME_LOG_LSP_NONE: Use to omit the log lsp command parameter
- * @NVME_LOG_LSI_NONE: Use to omit the log lsi command parameter
+ * @NVME_UUID_NONE: Use to omit a uuid command parameter
+ * @NVME_CNTLID_NONE: Use to omit a cntlid command parameter
+ * @NVME_NVMSETID_NONE: Use to omit a nvmsetid command parameter
+ * @NVME_LOG_LSP_NONE: Use to omit a log lsp command parameter
+ * @NVME_LOG_LSI_NONE: Use to omit a log lsi command parameter
* @NVME_IDENTIFY_DATA_SIZE: The transfer size for nvme identify commands
* @NVME_ID_NVMSET_LIST_MAX: The largest possible nvmset index in identify
* nvmeset
* @NVME_LOG_TELEM_BLOCK_SIZE: Specification defined size of Telemetry Data Blocks
* @NVME_DSM_MAX_RANGES: The largest possible range index in a data-set
* management command
- * @NVME_NQN_LENGTH: Max length for NVMe Qualified Name.
- * @NVMF_TRADDR_SIZE:
- * @NVMF_TSAS_SIZE:
+ * @NVME_NQN_LENGTH: Max length for NVMe Qualified Name
+ * @NVMF_TRADDR_SIZE: Max Transport Address size
+ * @NVMF_TSAS_SIZE: Max Transport Specific Address Subtype size
*/
enum nvme_constants {
NVME_NSID_ALL = 0xffffffff,
NVME_NQN_LENGTH = 256,
NVMF_TRADDR_SIZE = 256,
NVMF_TSAS_SIZE = 256,
- NVME_NIDT_EUI64_LEN = 8,
- NVME_NIDT_NGUID_LEN = 16,
};
/**
return le32_to_cpu(*p) | ((uint64_t)le32_to_cpu(*(p + 1)) << 32);
}
-#define NVME_REG_VALUE(name, value) \
- (((value) >> NVME_##name##_SHIFT) & NVME_##name##_MASK)
+#define NVME_REG_VALUE(name, value) NVME_GET(name, value)
enum nvme_cap {
NVME_CAP_MQES_SHIFT = 0,
NVME_NIDT_UUID = 3,
};
+enum nvme_ns_id_desc_nidt_lens {
+ NVME_NIDT_EUI64_LEN = 8,
+ NVME_NIDT_NGUID_LEN = 16,
+ NVME_NIDT_UUID_LEN = 16,
+};
+
/**
* struct nvme_nvmset_attr - NVM Set Attributes Entry
- * @id: NVM Set Identifier
- * @endurance_group_id: Endurance Group Identifier
- * @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.
- * @opt_write_size:
- * @total_nvmset_cap:
- * @unalloc_nvmset_cap:
+ * @nvmsetid: NVM Set Identifier
+ * @endgid: Endurance Group Identifier
+ * @rr4kt: 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.
+ * @ows: Optimal Write Size
+ * @tnvmsetcap: Total NVM Set Capacity
+ * @unvmsetcap: Unallocated NVM Set Capacity
*/
struct nvme_nvmset_attr {
- __le16 id;
- __le16 endurance_group_id;
+ __le16 nvmsetid;
+ __le16 endgid;
__u8 rsvd4[4];
- __le32 random_4k_read_typical;
- __le32 opt_write_size;
- __u8 total_nvmset_cap[16];
- __u8 unalloc_nvmset_cap[16];
+ __le32 rr4kt;
+ __le32 ows;
+ __u8 tnvmsetcap[16];
+ __u8 unvmsetcap[16];
__u8 rsvd48[80];
};
/**
* struct nvme_id_ns_granularity_desc -
- * @namespace_size_granularity:
- * @namespace_capacity_granularity:
+ * @nszegran:
+ * @ncapgran:
*/
struct nvme_id_ns_granularity_desc {
- __le64 namespace_size_granularity;
- __le64 namespace_capacity_granularity;
+ __le64 nszegran;
+ __le64 ncapgran;
};
/**
* @NVME_SANITIZE_SSTAT_STATUS_ND_COMPLETE_SUCCESS:
*/
enum nvme_sanitize_sstat {
+ NVME_SANITIZE_SSTAT_STATUS_SHIFT = 0,
NVME_SANITIZE_SSTAT_STATUS_MASK = 0x7,
NVME_SANITIZE_SSTAT_STATUS_NEVER_SANITIZED = 0,
NVME_SANITIZE_SSTAT_STATUS_COMPLETE_SUCCESS = 1,
NVME_SANITIZE_SSTAT_STATUS_IN_PROGESS = 2,
NVME_SANITIZE_SSTAT_STATUS_COMPLETED_FAILED = 3,
NVME_SANITIZE_SSTAT_STATUS_ND_COMPLETE_SUCCESS = 4,
- NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK = 0xf8,
NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT = 3,
- NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED = 1 << 8,
+ NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK = 0x1f,
+ NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_SHIFT = 8,
+ NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED_MASK = 0x1,
};
/**
* enum nvme_apst_entry -
*/
enum nvme_apst_entry {
- NVME_APST_ENTRY_ITPS_MASK = 0xf8,
NVME_APST_ENTRY_ITPS_SHIFT = 3,
- NVME_APST_ENTRY_ITPT_MASK = 0xffffff00,
NVME_APST_ENTRY_ITPT_SHIFT = 8,
+ NVME_APST_ENTRY_ITPS_MASK = 0x1f,
+ NVME_APST_ENTRY_ITPT_MASK = 0xffffff,
};
/**
};
/**
- * struct nvme_reservation_status -{
+ * struct nvme_resv_status -{
* @gen:
* @rtype:
* @regctl:
* @regctl_eds:
* @regctl_ds:
*/
-struct nvme_reservation_status {
+struct nvme_resv_status {
__le32 gen;
__u8 rtype;
__u8 regctl[2];