smartmontools  SVN Rev 4631
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Macros | Functions | Variables
netbsd_nvme_ioctl.h File Reference
#include <sys/param.h>
Include dependency graph for netbsd_nvme_ioctl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nvme_sge
 
struct  nvme_sqe
 
struct  nvme_cqe
 
struct  nvme_pt_command
 

Macros

#define NVME_CQE_DNR   __BIT(15)
 
#define NVME_CQE_M   __BIT(14)
 
#define NVME_CQE_SCT(_f)   ((_f) & (0x07 << 8))
 
#define NVME_CQE_SCT_GENERIC   (0x00 << 8)
 
#define NVME_CQE_SCT_COMMAND   (0x01 << 8)
 
#define NVME_CQE_SCT_MEDIAERR   (0x02 << 8)
 
#define NVME_CQE_SCT_VENDOR   (0x07 << 8)
 
#define NVME_CQE_SC(_f)   ((_f) & (0x7f << 1))
 
#define NVME_CQE_SC_SUCCESS   (0x00 << 1)
 
#define NVME_CQE_SC_INVALID_OPCODE   (0x01 << 1)
 
#define NVME_CQE_SC_INVALID_FIELD   (0x02 << 1)
 
#define NVME_CQE_SC_CID_CONFLICT   (0x03 << 1)
 
#define NVME_CQE_SC_DATA_XFER_ERR   (0x04 << 1)
 
#define NVME_CQE_SC_ABRT_BY_NO_PWR   (0x05 << 1)
 
#define NVME_CQE_SC_INTERNAL_DEV_ERR   (0x06 << 1)
 
#define NVME_CQE_SC_CMD_ABRT_REQD   (0x07 << 1)
 
#define NVME_CQE_SC_CMD_ABDR_SQ_DEL   (0x08 << 1)
 
#define NVME_CQE_SC_CMD_ABDR_FUSE_ERR   (0x09 << 1)
 
#define NVME_CQE_SC_CMD_ABDR_FUSE_MISS   (0x0a << 1)
 
#define NVME_CQE_SC_INVALID_NS   (0x0b << 1)
 
#define NVME_CQE_SC_CMD_SEQ_ERR   (0x0c << 1)
 
#define NVME_CQE_SC_INVALID_LAST_SGL   (0x0d << 1)
 
#define NVME_CQE_SC_INVALID_NUM_SGL   (0x0e << 1)
 
#define NVME_CQE_SC_DATA_SGL_LEN   (0x0f << 1)
 
#define NVME_CQE_SC_MDATA_SGL_LEN   (0x10 << 1)
 
#define NVME_CQE_SC_SGL_TYPE_INVALID   (0x11 << 1)
 
#define NVME_CQE_SC_LBA_RANGE   (0x80 << 1)
 
#define NVME_CQE_SC_CAP_EXCEEDED   (0x81 << 1)
 
#define NVME_CQE_NS_NOT_RDY   (0x82 << 1)
 
#define NVME_CQE_RSV_CONFLICT   (0x83 << 1)
 
#define NVME_CQE_PHASE   __BIT(0)
 
#define NVME_PASSTHROUGH_CMD   _IOWR('n', 0, struct nvme_pt_command)
 
#define nvme_completion_is_error(cpl)
 
#define NVME_PREFIX   "/dev/nvme"
 
#define NVME_NS_PREFIX   "ns"
 

Functions

struct nvme_sge __aligned (8)
 

Variables

uint8_t id
 
uint8_t _reserved [15]
 
uint8_t opcode
 
uint8_t flags
 
uint16_t cid
 
uint32_t nsid
 
uint64_t mptr
 
union {
   uint64_t   prp [2]
 
   struct nvme_sge   sge
 
entry
 
uint32_t cdw10
 
uint32_t cdw11
 
uint32_t cdw12
 
uint32_t cdw13
 
uint32_t cdw14
 
uint32_t cdw15
 
uint32_t cdw0
 
uint16_t sqhd
 
uint16_t sqid
 
struct nvme_pt_command __aligned
 

Macro Definition Documentation

#define nvme_completion_is_error (   cpl)
Value:
#define NVME_CQE_SCT(_f)
#define NVME_CQE_SC_SUCCESS
#define NVME_CQE_SC(_f)
#define NVME_CQE_SCT_GENERIC
uint8_t flags

Definition at line 124 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_DNR   __BIT(15)

Definition at line 90 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_M   __BIT(14)

Definition at line 91 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_NS_NOT_RDY   (0x82 << 1)

Definition at line 118 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_PHASE   __BIT(0)

Definition at line 120 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_RSV_CONFLICT   (0x83 << 1)

Definition at line 119 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC (   _f)    ((_f) & (0x7f << 1))

Definition at line 97 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_ABRT_BY_NO_PWR   (0x05 << 1)

Definition at line 103 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CAP_EXCEEDED   (0x81 << 1)

Definition at line 117 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CID_CONFLICT   (0x03 << 1)

Definition at line 101 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CMD_ABDR_FUSE_ERR   (0x09 << 1)

Definition at line 107 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CMD_ABDR_FUSE_MISS   (0x0a << 1)

Definition at line 108 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CMD_ABDR_SQ_DEL   (0x08 << 1)

Definition at line 106 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CMD_ABRT_REQD   (0x07 << 1)

Definition at line 105 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_CMD_SEQ_ERR   (0x0c << 1)

Definition at line 110 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_DATA_SGL_LEN   (0x0f << 1)

Definition at line 113 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_DATA_XFER_ERR   (0x04 << 1)

Definition at line 102 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INTERNAL_DEV_ERR   (0x06 << 1)

Definition at line 104 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INVALID_FIELD   (0x02 << 1)

Definition at line 100 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INVALID_LAST_SGL   (0x0d << 1)

Definition at line 111 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INVALID_NS   (0x0b << 1)

Definition at line 109 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INVALID_NUM_SGL   (0x0e << 1)

Definition at line 112 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_INVALID_OPCODE   (0x01 << 1)

Definition at line 99 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_LBA_RANGE   (0x80 << 1)

Definition at line 116 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_MDATA_SGL_LEN   (0x10 << 1)

Definition at line 114 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_SGL_TYPE_INVALID   (0x11 << 1)

Definition at line 115 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SC_SUCCESS   (0x00 << 1)

Definition at line 98 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SCT (   _f)    ((_f) & (0x07 << 8))

Definition at line 92 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SCT_COMMAND   (0x01 << 8)

Definition at line 94 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SCT_GENERIC   (0x00 << 8)

Definition at line 93 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SCT_MEDIAERR   (0x02 << 8)

Definition at line 95 of file netbsd_nvme_ioctl.h.

#define NVME_CQE_SCT_VENDOR   (0x07 << 8)

Definition at line 96 of file netbsd_nvme_ioctl.h.

#define NVME_NS_PREFIX   "ns"

Definition at line 183 of file netbsd_nvme_ioctl.h.

#define NVME_PASSTHROUGH_CMD   _IOWR('n', 0, struct nvme_pt_command)

Definition at line 122 of file netbsd_nvme_ioctl.h.

#define NVME_PREFIX   "/dev/nvme"

Definition at line 182 of file netbsd_nvme_ioctl.h.

Function Documentation

struct nvme_sge __aligned ( )

Variable Documentation

struct nvme_cqe __aligned
uint32_t _reserved

Definition at line 82 of file netbsd_nvme_ioctl.h.

uint32_t cdw0

Definition at line 81 of file netbsd_nvme_ioctl.h.

uint32_t cdw10

Definition at line 96 of file netbsd_nvme_ioctl.h.

uint32_t cdw11

Definition at line 97 of file netbsd_nvme_ioctl.h.

uint32_t cdw12

Definition at line 98 of file netbsd_nvme_ioctl.h.

uint32_t cdw13

Definition at line 99 of file netbsd_nvme_ioctl.h.

uint32_t cdw14

Definition at line 100 of file netbsd_nvme_ioctl.h.

uint32_t cdw15

Definition at line 101 of file netbsd_nvme_ioctl.h.

uint16_t cid

Definition at line 83 of file netbsd_nvme_ioctl.h.

union { ... } entry
uint16_t flags

Definition at line 82 of file netbsd_nvme_ioctl.h.

uint8_t id

Definition at line 81 of file netbsd_nvme_ioctl.h.

uint64_t mptr

Definition at line 89 of file netbsd_nvme_ioctl.h.

uint32_t nsid

Definition at line 85 of file netbsd_nvme_ioctl.h.

uint8_t opcode

Definition at line 81 of file netbsd_nvme_ioctl.h.

uint64_t prp[2]

Definition at line 92 of file netbsd_nvme_ioctl.h.

struct nvme_sge sge

Definition at line 93 of file netbsd_nvme_ioctl.h.

uint16_t sqhd

Definition at line 85 of file netbsd_nvme_ioctl.h.

uint16_t sqid

Definition at line 86 of file netbsd_nvme_ioctl.h.