From owner-svn-src-all@freebsd.org Wed May 9 18:41:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6D35FC7DF5; Wed, 9 May 2018 18:41:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B13E6A74C; Wed, 9 May 2018 18:41:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D866153F0; Wed, 9 May 2018 18:41:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w49If5mT009960; Wed, 9 May 2018 18:41:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w49If5vg009959; Wed, 9 May 2018 18:41:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201805091841.w49If5vg009959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 9 May 2018 18:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333424 - head/sbin/camcontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/camcontrol X-SVN-Commit-Revision: 333424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 18:41:06 -0000 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); + } + } } /*