Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Dec 2013 00:07:04 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259150 - head/sys/dev/cxgbe
Message-ID:  <201312100007.rBA074Qq055579@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312100007.rBA074Qq055579>