Netdev List
 help / color / mirror / Atom feed
From: "Yaniv Rosner" <yanivr@broadcom.com>
To: "Ben Hutchings" <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, eilong@broadcom.com
Subject: [PATCH] ethtool: Add support for 20G link speed
Date: Sun, 5 Jun 2011 20:39:43 +0300	[thread overview]
Message-ID: <1307295583.20872.123.camel@lb-tlvb-dmitry> (raw)

Hi Ben,
I'm resubmitting the addition of 20G with your corrections to ethtool.

Thanks,
Yaniv

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
---
 ethtool.8.in |    2 ++
 ethtool.c    |   18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/ethtool.8.in b/ethtool.8.in
index 7b1cdf5..2983b3e 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -499,6 +499,8 @@ lB	l	lB.
 0x020	1000 Full
 0x8000	2500 Full	(not supported by IEEE standards)
 0x1000	10000 Full
+0x20000	20000MLD2 Full	(not supported by IEEE standards)
+0x40000	20000KR2 Full	(not supported by IEEE standards)
 .TE
 .TP
 .BI phyad \ N
diff --git a/ethtool.c b/ethtool.c
index c189c78..35c3733 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -1244,6 +1244,20 @@ dump_link_caps(const char *prefix, const char *an_prefix, u32 mask)
 	if (mask & ADVERTISED_10000baseT_Full) {
 		did1++; fprintf(stdout, "10000baseT/Full ");
 	}
+	if (did1 && (mask & ADVERTISED_20000baseMLD2_Full)) {
+		fprintf(stdout, "\n");
+		fprintf(stdout, "	%*s", indent, "");
+	}
+	if (mask & ADVERTISED_20000baseMLD2_Full) {
+		did1++; fprintf(stdout, "20000baseMLD2/Full ");
+	}
+	if (did1 && (mask & ADVERTISED_20000baseKR2_Full)) {
+		fprintf(stdout, "\n");
+		fprintf(stdout, "	%*s", indent, "");
+	}
+	if (mask & ADVERTISED_20000baseKR2_Full) {
+		did1++; fprintf(stdout, "20000baseKR2/Full ");
+	}
 	if (did1 == 0)
 		 fprintf(stdout, "Not reported");
 	fprintf(stdout, "\n");
@@ -2474,7 +2488,9 @@ static int do_sset(int fd, struct ifreq *ifr)
 					 ADVERTISED_1000baseT_Half |
 					 ADVERTISED_1000baseT_Full |
 					 ADVERTISED_2500baseX_Full |
-					 ADVERTISED_10000baseT_Full);
+					 ADVERTISED_10000baseT_Full |
+					 ADVERTISED_20000baseMLD2_Full |
+					 ADVERTISED_20000baseKR2_Full);
 			} else if (advertising_wanted > 0) {
 				ecmd.advertising = advertising_wanted;
 			}
-- 
1.7.1





             reply	other threads:[~2011-06-05 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 17:39 Yaniv Rosner [this message]
2011-06-06 10:12 ` [PATCH] ethtool: Add support for 20G link speed Ben Hutchings
  -- strict thread matches above, loose matches on Subject: below --
2011-05-23 13:38 Yaniv Rosner
2011-06-01 22:15 ` Ben Hutchings

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=1307295583.20872.123.camel@lb-tlvb-dmitry \
    --to=yanivr@broadcom.com \
    --cc=bhutchings@solarflare.com \
    --cc=eilong@broadcom.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