From owner-svn-src-all@FreeBSD.ORG Tue Dec 10 00:07:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91484DF4; Tue, 10 Dec 2013 00:07:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D29A1E18; Tue, 10 Dec 2013 00:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBA074hw055580; Tue, 10 Dec 2013 00:07:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBA074Qq055579; Tue, 10 Dec 2013 00:07:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201312100007.rBA074Qq055579@svn.freebsd.org> From: Adrian Chadd Date: Tue, 10 Dec 2013 00:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259150 - head/sys/dev/cxgbe X-SVN-Group: head 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.17 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: Tue, 10 Dec 2013 00:07:04 -0000 Author: adrian Date: Tue Dec 10 00:07:04 2013 New Revision: 259150 URL: http://svnweb.freebsd.org/changeset/base/259150 Log: Print out the full PCIe link negotiation during dmesg. I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot or not. Reviewed by: np Sponsored by: Netflix, inc. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Dec 9 23:59:16 2013 (r259149) +++ head/sys/dev/cxgbe/t4_main.c Tue Dec 10 00:07:04 2013 (r259150) @@ -549,6 +549,7 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD int ofld_rqidx, ofld_tqidx; #endif + const char *pcie_ts; sc = device_get_softc(dev); sc->dev = dev; @@ -816,9 +817,24 @@ t4_attach(device_t dev) goto done; } + switch (sc->params.pci.speed) { + case 0x1: + pcie_ts = "2.5"; + break; + case 0x2: + pcie_ts = "5.0"; + break; + case 0x3: + pcie_ts = "8.0"; + break; + default: + pcie_ts = "??"; + break; + } device_printf(dev, - "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, sc->params.nports, sc->intr_count, + "PCIe x%d (%s GTS/s) (%d), %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.width, pcie_ts, sc->params.pci.speed, + sc->params.nports, sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq);