Date: Wed, 9 May 2018 18:41:05 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333424 - head/sbin/camcontrol Message-ID: <201805091841.w49If5vg009959@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed May 9 18:41:04 2018 New Revision: 333424 URL: https://svnweb.freebsd.org/changeset/base/333424 Log: 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 Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed May 9 18:39:31 2018 (r333423) +++ head/sbin/camcontrol/camcontrol.c Wed May 9 18:41:04 2018 (r333424) @@ -5167,7 +5167,22 @@ cts_print(struct cam_device *device, struct ccb_trans_ "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); + } + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805091841.w49If5vg009959>