smartmontools SVN Rev 5632
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

◆ nvme_completion_is_error

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

Definition at line 124 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_DNR

#define NVME_CQE_DNR   __BIT(15)

Definition at line 9 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_M

#define NVME_CQE_M   __BIT(14)

Definition at line 10 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_NS_NOT_RDY

#define NVME_CQE_NS_NOT_RDY   (0x82 << 1)

Definition at line 37 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_PHASE

#define NVME_CQE_PHASE   __BIT(0)

Definition at line 39 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_RSV_CONFLICT

#define NVME_CQE_RSV_CONFLICT   (0x83 << 1)

Definition at line 38 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC

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

Definition at line 16 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_ABRT_BY_NO_PWR

#define NVME_CQE_SC_ABRT_BY_NO_PWR   (0x05 << 1)

Definition at line 22 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CAP_EXCEEDED

#define NVME_CQE_SC_CAP_EXCEEDED   (0x81 << 1)

Definition at line 36 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CID_CONFLICT

#define NVME_CQE_SC_CID_CONFLICT   (0x03 << 1)

Definition at line 20 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CMD_ABDR_FUSE_ERR

#define NVME_CQE_SC_CMD_ABDR_FUSE_ERR   (0x09 << 1)

Definition at line 26 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CMD_ABDR_FUSE_MISS

#define NVME_CQE_SC_CMD_ABDR_FUSE_MISS   (0x0a << 1)

Definition at line 27 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CMD_ABDR_SQ_DEL

#define NVME_CQE_SC_CMD_ABDR_SQ_DEL   (0x08 << 1)

Definition at line 25 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CMD_ABRT_REQD

#define NVME_CQE_SC_CMD_ABRT_REQD   (0x07 << 1)

Definition at line 24 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_CMD_SEQ_ERR

#define NVME_CQE_SC_CMD_SEQ_ERR   (0x0c << 1)

Definition at line 29 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_DATA_SGL_LEN

#define NVME_CQE_SC_DATA_SGL_LEN   (0x0f << 1)

Definition at line 32 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_DATA_XFER_ERR

#define NVME_CQE_SC_DATA_XFER_ERR   (0x04 << 1)

Definition at line 21 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INTERNAL_DEV_ERR

#define NVME_CQE_SC_INTERNAL_DEV_ERR   (0x06 << 1)

Definition at line 23 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INVALID_FIELD

#define NVME_CQE_SC_INVALID_FIELD   (0x02 << 1)

Definition at line 19 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INVALID_LAST_SGL

#define NVME_CQE_SC_INVALID_LAST_SGL   (0x0d << 1)

Definition at line 30 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INVALID_NS

#define NVME_CQE_SC_INVALID_NS   (0x0b << 1)

Definition at line 28 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INVALID_NUM_SGL

#define NVME_CQE_SC_INVALID_NUM_SGL   (0x0e << 1)

Definition at line 31 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_INVALID_OPCODE

#define NVME_CQE_SC_INVALID_OPCODE   (0x01 << 1)

Definition at line 18 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_LBA_RANGE

#define NVME_CQE_SC_LBA_RANGE   (0x80 << 1)

Definition at line 35 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_MDATA_SGL_LEN

#define NVME_CQE_SC_MDATA_SGL_LEN   (0x10 << 1)

Definition at line 33 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_SGL_TYPE_INVALID

#define NVME_CQE_SC_SGL_TYPE_INVALID   (0x11 << 1)

Definition at line 34 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SC_SUCCESS

#define NVME_CQE_SC_SUCCESS   (0x00 << 1)

Definition at line 17 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SCT

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

Definition at line 11 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SCT_COMMAND

#define NVME_CQE_SCT_COMMAND   (0x01 << 8)

Definition at line 13 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SCT_GENERIC

#define NVME_CQE_SCT_GENERIC   (0x00 << 8)

Definition at line 12 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SCT_MEDIAERR

#define NVME_CQE_SCT_MEDIAERR   (0x02 << 8)

Definition at line 14 of file netbsd_nvme_ioctl.h.

◆ NVME_CQE_SCT_VENDOR

#define NVME_CQE_SCT_VENDOR   (0x07 << 8)

Definition at line 15 of file netbsd_nvme_ioctl.h.

◆ NVME_NS_PREFIX

#define NVME_NS_PREFIX   "ns"

Definition at line 183 of file netbsd_nvme_ioctl.h.

◆ NVME_PASSTHROUGH_CMD

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

Definition at line 122 of file netbsd_nvme_ioctl.h.

◆ NVME_PREFIX

#define NVME_PREFIX   "/dev/nvme"

Definition at line 182 of file netbsd_nvme_ioctl.h.

Function Documentation

◆ __aligned()

struct nvme_sge __aligned ( )

Variable Documentation

◆ __aligned

struct nvme_cqe __aligned

◆ _reserved

uint32_t _reserved

Definition at line 1 of file netbsd_nvme_ioctl.h.

◆ cdw0

uint32_t cdw0

Definition at line 0 of file netbsd_nvme_ioctl.h.

◆ cdw10

uint32_t cdw10

Definition at line 15 of file netbsd_nvme_ioctl.h.

◆ cdw11

uint32_t cdw11

Definition at line 16 of file netbsd_nvme_ioctl.h.

◆ cdw12

uint32_t cdw12

Definition at line 17 of file netbsd_nvme_ioctl.h.

◆ cdw13

uint32_t cdw13

Definition at line 18 of file netbsd_nvme_ioctl.h.

◆ cdw14

uint32_t cdw14

Definition at line 19 of file netbsd_nvme_ioctl.h.

◆ cdw15

uint32_t cdw15

Definition at line 20 of file netbsd_nvme_ioctl.h.

◆ cid

uint16_t cid

Definition at line 2 of file netbsd_nvme_ioctl.h.

◆ 

union { ... } entry

◆ flags

uint16_t flags

Definition at line 1 of file netbsd_nvme_ioctl.h.

◆ id

uint8_t id

Definition at line 0 of file netbsd_nvme_ioctl.h.

◆ mptr

uint64_t mptr

Definition at line 8 of file netbsd_nvme_ioctl.h.

◆ nsid

uint32_t nsid

Definition at line 4 of file netbsd_nvme_ioctl.h.

◆ opcode

uint8_t opcode

Definition at line 0 of file netbsd_nvme_ioctl.h.

◆ prp

uint64_t prp[2]

Definition at line 11 of file netbsd_nvme_ioctl.h.

◆ sge

struct nvme_sge sge

Definition at line 12 of file netbsd_nvme_ioctl.h.

◆ sqhd

uint16_t sqhd

Definition at line 4 of file netbsd_nvme_ioctl.h.

◆ sqid

uint16_t sqid

Definition at line 5 of file netbsd_nvme_ioctl.h.