Skip to main content

nvme_admin_passthru

Function nvme_admin_passthru 

Source
pub unsafe extern "C" fn nvme_admin_passthru(
    fd: c_int,
    opcode: __u8,
    flags: __u8,
    rsvd: __u16,
    nsid: __u32,
    cdw2: __u32,
    cdw3: __u32,
    cdw10: __u32,
    cdw11: __u32,
    cdw12: __u32,
    cdw13: __u32,
    cdw14: __u32,
    cdw15: __u32,
    data_len: __u32,
    data: *mut c_void,
    metadata_len: __u32,
    metadata: *mut c_void,
    timeout_ms: __u32,
    result: *mut __u32,
) -> c_int
Expand description

nvme_admin_passthru() - Submit an nvme passthrough command @fd: File descriptor of nvme device @opcode: The nvme io command to send @flags: NVMe command flags (not used) @rsvd: Reserved for future use @nsid: Namespace identifier @cdw2: Command dword 2 @cdw3: Command dword 3 @cdw10: Command dword 10 @cdw11: Command dword 11 @cdw12: Command dword 12 @cdw13: Command dword 13 @cdw14: Command dword 14 @cdw15: Command dword 15 @data_len: Length of the data transferred in this command in bytes @data: Pointer to user address of the data buffer @metadata_len:Length of metadata transferred in this command @metadata: Pointer to user address of the metadata buffer @timeout_ms: How long the kernel waits for the command to complete @result: Optional field to return the result from the CQE dword 0

Parameterized form of nvme_submit_admin_passthru(). This sets up and submits a &struct nvme_passthru_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.