git: b8cb8dd3625d - main - nvme: Add constants for the PSDT field in cdw0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 23 Mar 2024 00:25:34 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b8cb8dd3625d7396ea98152d89e1e64b16e77bc6 commit b8cb8dd3625d7396ea98152d89e1e64b16e77bc6 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-03-23 00:23:24 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-03-23 00:23:24 +0000 nvme: Add constants for the PSDT field in cdw0 This is not used in nvme(4) but is used in NVMe over Fabrics transports which use SGLs to describe buffers instead of PRPs. While here, adjust the shift value for the FUSE field to be relative to the 'fuse' member of 'struct nvme_command'. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44443 --- sys/dev/nvme/nvme.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 5d3e60ece329..6eb9ef69b33b 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -211,9 +211,18 @@ /* Command field definitions */ -#define NVME_CMD_FUSE_SHIFT (8) +#define NVME_CMD_FUSE_SHIFT (0) #define NVME_CMD_FUSE_MASK (0x3) +enum nvme_psdt { + NVME_PSDT_PRP = 0x0, + NVME_PSDT_SGL = 0x1, + NVME_PSDT_SGL_MPTR = 0x2 +}; +#define NVME_CMD_PSDT_SHIFT (6) +#define NVME_CMD_PSDT_MASK (0x3) + + #define NVME_STATUS_P_SHIFT (0) #define NVME_STATUS_P_MASK (0x1) #define NVME_STATUS_SC_SHIFT (1)