Skip to content

Commit 660ed36

Browse files
ikegami-tigaw
authored andcommitted
types: Add PEL header additional information definitions
The changes for persistent event entry ehai print function. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent d96e92a commit 660ed36

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,6 +3444,41 @@ enum nvme_persistent_event_types {
34443444
NVME_PEL_THERMAL_EXCURSION_EVENT = 0x0d,
34453445
};
34463446

3447+
/**
3448+
* enum nvme_pel_ehai - This field indicates the persistent event header additional information
3449+
* @NVME_PEL_EHAI_PIT_SHIFT: Shift amount to get the reporting context port identifier
3450+
* from the &struct nvme_persistent_event_log.rci field.
3451+
* @NVME_PEL_EHAI_RSVD_SHIFT: Shift amount to get the reserved reporting context
3452+
* from the &struct nvme_persistent_event_log.rci field.
3453+
* @NVME_PEL_EHAI_PIT_MASK: Mask to get the reporting context port identifier from
3454+
* the &struct nvme_st_result.dsts field.
3455+
* @NVME_PEL_EHAI_RSVD_MASK: Mask to get the reserved reporting context from
3456+
* the &struct nvme_st_result.dsts field.
3457+
*/
3458+
enum nvme_pel_ehai {
3459+
NVME_PEL_EHAI_PIT_SHIFT = 0,
3460+
NVME_PEL_EHAI_RSVD_SHIFT = 2,
3461+
NVME_PEL_EHAI_PIT_MASK = 0x3,
3462+
NVME_PEL_EHAI_RSVD_MASK = 0x3f,
3463+
};
3464+
3465+
#define NVME_PEL_EHAI_PIT(ehai) NVME_GET(ehai, PEL_EHAI_PIT)
3466+
#define NVME_PEL_EHAI_RSVD(ehai) NVME_GET(ehai, PEL_EHAI_RSVD)
3467+
3468+
/**
3469+
* enum nvme_pel_ehai_pit - Persistent Event Header Additional Information - Port Identifier Type
3470+
* @NVME_PEL_EHAI_PIT_NOT_REPORTED: PIT not reported and PELPID does not apply
3471+
* @NVME_PEL_EHAI_PIT_NSS_PORT: NVM subsystem port
3472+
* @NVME_PEL_EHAI_PIT_NMI_PORT: NVMe-MI port
3473+
* @NVME_PEL_EHAI_PIT_NOT_ASSOCIATED: Event not associated with any port and PELPID does not apply
3474+
*/
3475+
enum nvme_pel_ehai_pit {
3476+
NVME_PEL_EHAI_PIT_NOT_REPORTED = 0,
3477+
NVME_PEL_EHAI_PIT_NSS_PORT = 1,
3478+
NVME_PEL_EHAI_PIT_NMI_PORT = 2,
3479+
NVME_PEL_EHAI_PIT_NOT_ASSOCIATED = 3,
3480+
};
3481+
34473482
/**
34483483
* struct nvme_fw_commit_event - Firmware Commit Event Data
34493484
* @old_fw_rev: Old Firmware Revision

0 commit comments

Comments
 (0)