diff options
author | James Smart <james.smart@broadcom.com> | 2016-06-06 23:20:47 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-12 07:29:43 -0600 |
commit | 3972be23bd2d2bcfaa44595a260a371cd9218872 (patch) | |
tree | df58ef529da2774e6f76db165da952f95ff591dc | |
parent | 79f370eac63796a8933b210bca02f006ba32d22e (diff) |
nvme.h: add constants for PSDT and FUSE values
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | include/linux/nvme.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index a9b8c7bcaf85..2b82f05fe4ec 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -306,6 +306,29 @@ enum nvme_opcode { nvme_cmd_resv_release = 0x15, }; +/* + * Lowest two bits of our flags field (FUSE field in the spec): + * + * @NVME_CMD_FUSE_FIRST: Fused Operation, first command + * @NVME_CMD_FUSE_SECOND: Fused Operation, second command + * + * Highest two bits in our flags field (PSDT field in the spec): + * + * @NVME_CMD_PSDT_SGL_METABUF: Use SGLS for this transfer, + * If used, MPTR contains addr of single physical buffer (byte aligned). + * @NVME_CMD_PSDT_SGL_METASEG: Use SGLS for this transfer, + * If used, MPTR contains an address of an SGL segment containing + * exactly 1 SGL descriptor (qword aligned). + */ +enum { + NVME_CMD_FUSE_FIRST = (1 << 0), + NVME_CMD_FUSE_SECOND = (1 << 1), + + NVME_CMD_SGL_METABUF = (1 << 6), + NVME_CMD_SGL_METASEG = (1 << 7), + NVME_CMD_SGL_ALL = NVME_CMD_SGL_METABUF | NVME_CMD_SGL_METASEG, +}; + struct nvme_common_command { __u8 opcode; __u8 flags; |