diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-06-17 21:06:52 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-06-29 07:16:25 +0200 |
commit | 2a132309e45dfce6dcae901388c05c3cc3cb8d73 (patch) | |
tree | 7affa08177d0c5a2bfad9caf08078fe9d4703425 /include/block | |
parent | 189a8bf7f64aff9c2e26a6e6f2adc654eb9bbe81 (diff) |
hw/nvme: use prinfo directly in nvme_check_prinfo and nvme_dif_check
The nvme_check_prinfo() and nvme_dif_check() functions operate on the
16 bit "control" member of the NvmeCmd. These functions do not otherwise
operate on an NvmeCmd or an NvmeRequest, so change them to expect the
actual 4 bit PRINFO field and add constants that work on this field as
well.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/nvme.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h index 333affdb85..0fabe28b7b 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -708,6 +708,14 @@ enum { #define NVME_RW_PRINFO(control) ((control >> 10) & 0xf) +enum { + NVME_PRINFO_PRACT = 1 << 3, + NVME_PRINFO_PRCHK_GUARD = 1 << 2, + NVME_PRINFO_PRCHK_APP = 1 << 1, + NVME_PRINFO_PRCHK_REF = 1 << 0, + NVME_PRINFO_PRCHK_MASK = 7 << 0, +}; + typedef struct QEMU_PACKED NvmeDsmCmd { uint8_t opcode; uint8_t flags; |