From b50a076515b25feaaf5646df20bded99b2b90a3b Mon Sep 17 00:00:00 2001 From: Francis Pravin Date: Tue, 26 Nov 2024 10:08:10 +0530 Subject: [PATCH] types: add enum for the fields added in TP4160 Added the enum for MAXWZD and NSZS bits of ONCS field in Identify Controller Data Structure and the enum for NSZ bit in the Write Zeroes command. TP4160 - WZSL Limit Modification Signed-off-by: Francis Pravin --- src/nvme/types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/nvme/types.h b/src/nvme/types.h index 8264b620..82de8a98 100644 --- a/src/nvme/types.h +++ b/src/nvme/types.h @@ -2085,6 +2085,15 @@ enum nvme_id_ctrl_cqes { * @NVME_CTRL_ONCS_ALL_FAST_COPY: If set, then all copy operations for * the Copy command are fast copy * operations. + * @NVME_CTRL_ONCS_WRITE_ZEROES_DEALLOCATE: If MAXWZD bit set, then the maximum data + * size for Write Zeroes command depends on the + * value of the Deallocate bit in the Write Zeroes + * command and the value in the WZDSL field in the + * I/O Command Set specific Identify Controller + * data structure. + * @NVME_CTRL_ONCS_NAMESPACE_ZEROES: If NSZS bit set, then the controller supports + * the Namespace Zeroes (NSZ) bit in the NVM + * Command Set Write Zeroes command. */ enum nvme_id_ctrl_oncs { NVME_CTRL_ONCS_COMPARE = 1 << 0, @@ -2098,6 +2107,8 @@ enum nvme_id_ctrl_oncs { NVME_CTRL_ONCS_COPY = 1 << 8, NVME_CTRL_ONCS_COPY_SINGLE_ATOMICITY = 1 << 9, NVME_CTRL_ONCS_ALL_FAST_COPY = 1 << 10, + NVME_CTRL_ONCS_WRITE_ZEROES_DEALLOCATE = 1 << 11, + NVME_CTRL_ONCS_NAMESPACE_ZEROES = 1 << 12, }; /** @@ -8725,6 +8736,7 @@ enum nvme_kv_opcode { /** * enum nvme_io_control_flags - I/O control flags * @NVME_IO_DTYPE_STREAMS: Directive Type Streams + * @NVME_IO_NSZ: Namespace Zeroes * @NVME_IO_STC: Storage Tag Check * @NVME_IO_DEAC: Deallocate * @NVME_IO_ZNS_APPEND_PIREMAP: Protection Information Remap @@ -8737,6 +8749,7 @@ enum nvme_kv_opcode { */ enum nvme_io_control_flags { NVME_IO_DTYPE_STREAMS = 1 << 4, + NVME_IO_NSZ = 1 << 7, NVME_IO_STC = 1 << 8, NVME_IO_DEAC = 1 << 9, NVME_IO_ZNS_APPEND_PIREMAP = 1 << 9,