netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dimitris Michailidis <dm@chelsio.com>
To: netdev@vger.kernel.org
Cc: Dimitris Michailidis <dm@chelsio.com>
Subject: [PATCH net-next 2/3] cxgb4: report the PCIe link speed
Date: Mon, 10 May 2010 18:58:08 -0700	[thread overview]
Message-ID: <1273543089-10938-2-git-send-email-dm@chelsio.com> (raw)
In-Reply-To: <1273543089-10938-1-git-send-email-dm@chelsio.com>

Report the PCIe link speed (2.5 or 5 Gbps).

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
 drivers/net/cxgb4/cxgb4_main.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c
index a73cda9..80c3fc5 100644
--- a/drivers/net/cxgb4/cxgb4_main.c
+++ b/drivers/net/cxgb4/cxgb4_main.c
@@ -3080,6 +3080,12 @@ static void __devinit print_port_info(struct adapter *adap)
 
 	int i;
 	char buf[80];
+	const char *spd = "";
+
+	if (adap->params.pci.speed == PCI_EXP_LNKSTA_CLS_2_5GB)
+		spd = " 2.5 GT/s";
+	else if (adap->params.pci.speed == PCI_EXP_LNKSTA_CLS_5_0GB)
+		spd = " 5 GT/s";
 
 	for_each_port(adap, i) {
 		struct net_device *dev = adap->port[i];
@@ -3099,10 +3105,10 @@ static void __devinit print_port_info(struct adapter *adap)
 			--bufp;
 		sprintf(bufp, "BASE-%s", base[pi->port_type]);
 
-		netdev_info(dev, "Chelsio %s rev %d %s %sNIC PCIe x%d%s\n",
+		netdev_info(dev, "Chelsio %s rev %d %s %sNIC PCIe x%d%s%s\n",
 			    adap->params.vpd.id, adap->params.rev,
 			    buf, is_offload(adap) ? "R" : "",
-			    adap->params.pci.width,
+			    adap->params.pci.width, spd,
 			    (adap->flags & USING_MSIX) ? " MSI-X" :
 			    (adap->flags & USING_MSI) ? " MSI" : "");
 		if (adap->name == dev->name)
-- 
1.5.4


  reply	other threads:[~2010-05-11  1:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11  1:58 [PATCH net-next 1/3] cxgb4: configure HW VLAN extraction through FW Dimitris Michailidis
2010-05-11  1:58 ` Dimitris Michailidis [this message]
2010-05-11  1:58   ` [PATCH net-next 3/3] cxgb4: report GRO stats with ethtool -S Dimitris Michailidis
2010-05-11  3:02     ` Ben Greear
2010-05-11  8:45       ` Dimitris Michailidis
2010-05-13  6:32     ` David Miller
2010-05-13  6:32   ` [PATCH net-next 2/3] cxgb4: report the PCIe link speed David Miller
2010-05-13  6:32 ` [PATCH net-next 1/3] cxgb4: configure HW VLAN extraction through FW David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273543089-10938-2-git-send-email-dm@chelsio.com \
    --to=dm@chelsio.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).