Skip to content

Commit

Permalink
types: Add CMBSWTP property definitions
Browse files Browse the repository at this point in the history
Also change PMRSWTU to use NVME_UNIT definitions.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Apr 16, 2024
1 parent be1d6cd commit 963fed9
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,20 @@ enum nvme_cmbebs {
#define NVME_CMBEBS_RBB(cmbebs) NVME_GET(cmbebs, CMBEBS_RBB)
#define NVME_CMBEBS_CMBWBZ(cmbebs) NVME_GET(cmbebs, CMBEBS_CMBWBZ)

enum nvme_cmbswtp {
NVME_CMBSWTP_CMBSWTU_SHIFT = 0,
NVME_CMBSWTP_CMBSWTV_SHIFT = 8,
NVME_CMBSWTP_CMBSWTU_MASK = 0xf,
NVME_CMBSWTP_CMBSWTV_MASK = 0xffffff,
NVME_CMBSWTP_CMBSWTU_B = NVME_UNIT_B,
NVME_CMBSWTP_CMBSWTU_1K = NVME_UNIT_1K,
NVME_CMBSWTP_CMBSWTU_1M = NVME_UNIT_1M,
NVME_CMBSWTP_CMBSWTU_1G = NVME_UNIT_1G,
};

#define NVME_CMBSWTP_CMBSWTU(cmbswtp) NVME_GET(cmbswtp, CMBSWTP_CMBSWTU)
#define NVME_CMBSWTP_CMBSWTV(cmbswtp) NVME_GET(cmbswtp, CMBSWTP_CMBSWTV)

enum nvme_crto {
NVME_CRTO_CRIMT_SHIFT = 16,
NVME_CRTO_CRIMT_MASK = 0xffff0000,
Expand Down Expand Up @@ -610,10 +624,10 @@ enum nvme_pmrswtp {
NVME_PMRSWTP_PMRSWTV_SHIFT = 8,
NVME_PMRSWTP_PMRSWTU_MASK = 0xf,
NVME_PMRSWTP_PMRSWTV_MASK = 0xffffff,
NVME_PMRSWTP_PMRSWTU_BPS = 0,
NVME_PMRSWTP_PMRSWTU_KBPS = 1,
NVME_PMRSWTP_PMRSWTU_MBPS = 2,
NVME_PMRSWTP_PMRSWTU_GBPS = 3,
NVME_PMRSWTP_PMRSWTU_BPS = NVME_UNIT_B,
NVME_PMRSWTP_PMRSWTU_KBPS = NVME_UNIT_1K,
NVME_PMRSWTP_PMRSWTU_MBPS = NVME_UNIT_1M,
NVME_PMRSWTP_PMRSWTU_GBPS = NVME_UNIT_1G,
};

#define NVME_PMRSWTP_PMRSWTU(pmrswtp) NVME_GET(pmrswtp, PMRSWTP_PMRSWTU)
Expand Down

0 comments on commit 963fed9

Please sign in to comment.