aboutsummaryrefslogtreecommitdiff
path: root/sbin/camcontrol
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-05-09 18:41:04 +0000
committerWarner Losh <imp@FreeBSD.org>2018-05-09 18:41:04 +0000
commit0272270a8d6fe4e6edb92de3e1711442e5d15766 (patch)
tree1af4ad623bd6234689fb4bc77824203c919f9e56 /sbin/camcontrol
parentca9551221bf09deec04507a1efac747a28a64b3e (diff)
downloadsrc-0272270a8d6fe4e6edb92de3e1711442e5d15766.tar.gz
src-0272270a8d6fe4e6edb92de3e1711442e5d15766.zip
nda protocol rate reporting
Report the NVMe spec, number of lanes (and max) as well as the PCIe generation we're negotiated at (and max) for the camcontrol rate command. Reviewed by: scottl (the output, not the code) Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=333424
Diffstat (limited to 'sbin/camcontrol')
-rw-r--r--sbin/camcontrol/camcontrol.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index 47be6e294011..1192d01cfee8 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -5167,7 +5167,22 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts)
"enabled" : "disabled");
}
}
+ if (cts->protocol == PROTO_NVME) {
+ struct ccb_trans_settings_nvme *nvmex =
+ &cts->xport_specific.nvme;
+ if (nvmex->valid & CTS_NVME_VALID_SPEC) {
+ fprintf(stdout, "%sNVMe Spec: %d.%d\n", pathstr,
+ NVME_MAJOR(nvmex->spec),
+ NVME_MINOR(nvmex->spec));
+ }
+ if (nvmex->valid & CTS_NVME_VALID_LINK) {
+ fprintf(stdout, "%sPCIe lanes: %d (%d max)\n", pathstr,
+ nvmex->lanes, nvmex->max_lanes);
+ fprintf(stdout, "%sPCIe Generation: %d (%d max)\n", pathstr,
+ nvmex->speed, nvmex->max_speed);
+ }
+ }
}
/*