Skip to content
Merged
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
10 changes: 7 additions & 3 deletions nvme-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -2971,22 +2971,26 @@ static void json_nvme_id_ns_descs(void *data, unsigned int nsid)
static void json_nvme_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm)
{
struct json_object *r = json_create_object();
__u16 rsvd = (ctrl_nvm->aocs & 0xfffe) >> 1;
__u8 ralbas = ctrl_nvm->aocs & 0x1;

obj_add_uint(r, "vsl", ctrl_nvm->vsl);
obj_add_uint(r, "wzsl", ctrl_nvm->wzsl);
obj_add_uint(r, "wusl", ctrl_nvm->wusl);
obj_add_uint(r, "dmrl", ctrl_nvm->dmrl);
obj_add_uint(r, "dmrsl", le32_to_cpu(ctrl_nvm->dmrsl));
obj_add_uint64(r, "dmsl", le64_to_cpu(ctrl_nvm->dmsl));
obj_add_uint(r, "kpiocap", ctrl_nvm->kpiocap);
obj_add_uint(r, "wzdsl", ctrl_nvm->wzdsl);
obj_add_uint(r, "aocs", le16_to_cpu(ctrl_nvm->aocs));

__u16 rsvd = (ctrl_nvm->aocs & 0xfffe) >> 1;
__u8 ralbas = ctrl_nvm->aocs & 0x1;

if (rsvd)
obj_add_uint(r, "[15:1]: Reserved", rsvd);
obj_add_uint(r, "[0:0]: Reporting Allocated LBA Supported", ralbas);

obj_add_uint(r, "ver", le32_to_cpu(ctrl_nvm->ver));
obj_add_uint(r, "lbamqf", ctrl_nvm->lbamqf);

json_print(r);
}

Expand Down
18 changes: 18 additions & 0 deletions nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -3338,6 +3338,20 @@
}
}

static void stdout_id_ctrl_nvm_kpiocap(__u8 kpiocap)
{
__u8 rsvd2 = (kpiocap & 0xfc) >> 2;
__u8 kpiosc = (kpiocap & 0x2) >> 1;
__u8 kpios = kpiocap & 0x1;

if (rsvd2)
printf(" [7:2] : %#x\tReserved\n", rsvd2);
printf(" [1:1] : %#x\tKey Per I/O capability enabled and disabled %s in the"
"NVM subsystem\n", kpiosc, kpiosc ? "all namespaces" : "each namespace");

Check failure on line 3350 in nvme-print-stdout.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: quoted string split across lines

Check failure on line 3350 in nvme-print-stdout.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: break quoted strings at a space character
printf(" [0:0] : %#x\tKey Per I/O capability %sSupported\n", kpios,
kpios ? "" : "Not ");
}

static void stdout_id_ctrl_nvm_aocs(__u16 aocs)
{
__u16 rsvd = (aocs & 0xfffe) >> 1;
Expand Down Expand Up @@ -3384,6 +3398,10 @@
printf("dmrl : %u\n", ctrl_nvm->dmrl);
printf("dmrsl : %u\n", le32_to_cpu(ctrl_nvm->dmrsl));
printf("dmsl : %"PRIu64"\n", le64_to_cpu(ctrl_nvm->dmsl));
printf("kpiocap: %u\n", ctrl_nvm->kpiocap);
if (verbose)
stdout_id_ctrl_nvm_kpiocap(ctrl_nvm->kpiocap);
printf("wzdsl : %u\n", ctrl_nvm->wzdsl);
printf("aocs : %u\n", le16_to_cpu(ctrl_nvm->aocs));
if (verbose)
stdout_id_ctrl_nvm_aocs(le16_to_cpu(ctrl_nvm->aocs));
Expand Down