Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libnvme/src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,8 @@ enum nvme_id_ctrl_oaes {
* @NVME_CTRL_CTRATT_HMBR: HMB Restrict Non-Operational Power State Access
* @NVME_CTRL_CTRATT_RHII: Reservations and Host Identifier Interaction
* @NVME_CTRL_CTRATT_FDPS: Flexible Data Placement supported
* @NVME_CTRL_CTRATT_PLS: Power Limit Support
* @NVME_CTRL_CTRATT_PMS: Power Measurement Support
*/
enum nvme_id_ctrl_ctratt {
NVME_CTRL_CTRATT_128_ID = 1 << 0,
Expand All @@ -1843,6 +1845,8 @@ enum nvme_id_ctrl_ctratt {
NVME_CTRL_CTRATT_HMBR = 1 << 17,
NVME_CTRL_CTRATT_RHII = 1 << 18,
NVME_CTRL_CTRATT_FDPS = 1 << 19,
NVME_CTRL_CTRATT_PLS = 1 << 20,
NVME_CTRL_CTRATT_PMS = 1 << 21,
};

/**
Expand Down
12 changes: 9 additions & 3 deletions nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,9 @@ static void stdout_id_ctrl_oaes(__le32 ctrl_oaes)
static void stdout_id_ctrl_ctratt(__le32 ctrl_ctratt)
{
__u32 ctratt = le32_to_cpu(ctrl_ctratt);
__u32 rsvd20 = (ctratt >> 20);
__u32 rsvd22 = (ctratt >> 22);
__u32 pms = (ctratt & NVME_CTRL_CTRATT_PMS) >> 21;
__u32 pls = (ctratt & NVME_CTRL_CTRATT_PLS) >> 20;
__u32 fdps = (ctratt & NVME_CTRL_CTRATT_FDPS) >> 19;
__u32 rhii = (ctratt & NVME_CTRL_CTRATT_RHII) >> 18;
__u32 hmbr = (ctratt & NVME_CTRL_CTRATT_HMBR) >> 17;
Expand All @@ -1947,8 +1949,12 @@ static void stdout_id_ctrl_ctratt(__le32 ctrl_ctratt)
__u32 nopspm = (ctratt & NVME_CTRL_CTRATT_NON_OP_PSP) >> 1;
__u32 hids = (ctratt & NVME_CTRL_CTRATT_128_ID) >> 0;

if (rsvd20)
printf(" [31:20] : %#x\tReserved\n", rsvd20);
if (rsvd22)
printf(" [31:22] : %#x\tReserved\n", rsvd22);
printf(" [21:21] : %#x\tPower Measurement %sSupported\n",
pms, pms ? "" : "Not ");
printf(" [20:20] : %#x\tPower Limit %sSupported\n",
pls, pls ? "" : "Not ");
printf(" [19:19] : %#x\tFlexible Data Placement %sSupported\n",
fdps, fdps ? "" : "Not ");
printf(" [18:18] : %#x\tReservations and Host Identifier Interaction %sSupported\n",
Expand Down
Loading