Skip to content

Commit 83373d8

Browse files
ikegami-tigaw
authored andcommitted
types: Add PEL set feature event layout definitions
The changes for PEL set feature event print function. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 07b9438 commit 83373d8

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3651,6 +3651,34 @@ struct nvme_set_feature_event {
36513651
__le32 cdw_mem[0];
36523652
};
36533653

3654+
/**
3655+
* enum nvme_set_feat_event_layout - This field indicates the set feature event layout
3656+
* @NVME_SET_FEAT_EVENT_DW_COUNT_SHIFT: Shift amount to get the Dword count from the
3657+
* &struct nvme_set_feature_event.layout field.
3658+
* @NVME_SET_FEAT_EVENT_CC_DW0_SHIFT: Shift amount to get the logged command completion Dword 0
3659+
* from the &struct nvme_set_feature_event.layout field.
3660+
* @NVME_SET_FEAT_EVENT_MB_COUNT_SHIFT: Shift amount to get the memory buffer count from
3661+
* the &struct nvme_set_feature_event.layout field.
3662+
* @NVME_SET_FEAT_EVENT_DW_COUNT_MASK: Mask to get the Dword count from the &struct
3663+
* nvme_set_feature_event.layout field.
3664+
* @NVME_SET_FEAT_EVENT_CC_DW0_MASK: Mask to get the logged command completion Dword 0 from
3665+
* the &struct nvme_set_feature_event.layout field.
3666+
* @NVME_SET_FEAT_EVENT_MB_COUNT_MASK: Mask to get the memory buffer count from the &struct
3667+
* nvme_set_feature_event.layout field.
3668+
*/
3669+
enum nvme_set_feat_event_layout {
3670+
NVME_SET_FEAT_EVENT_DW_COUNT_SHIFT = 0,
3671+
NVME_SET_FEAT_EVENT_CC_DW0_SHIFT = 3,
3672+
NVME_SET_FEAT_EVENT_MB_COUNT_SHIFT = 16,
3673+
NVME_SET_FEAT_EVENT_DW_COUNT_MASK = 0x7,
3674+
NVME_SET_FEAT_EVENT_CC_DW0_MASK = 0x1,
3675+
NVME_SET_FEAT_EVENT_MB_COUNT_MASK = 0xffff,
3676+
};
3677+
3678+
#define NVME_SET_FEAT_EVENT_DW_COUNT(layout) NVME_GET(layout, SET_FEAT_EVENT_DW_COUNT)
3679+
#define NVME_SET_FEAT_EVENT_CC_DW0(layout) NVME_GET(layout, SET_FEAT_EVENT_CC_DW0)
3680+
#define NVME_SET_FEAT_EVENT_MB_COUNT(layout) NVME_GET(layout, SET_FEAT_EVENT_MB_COUNT)
3681+
36543682
/**
36553683
* struct nvme_thermal_exc_event - Thermal Excursion Event Data
36563684
* @over_temp: Over Temperature

0 commit comments

Comments
 (0)