From: Rick Jones <rick.jones2@hp.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Jeff Garzik <jgarzik@pobox.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] Make possible speeds known to ethtool
Date: Thu, 08 Jan 2009 11:50:03 -0800 [thread overview]
Message-ID: <496658EB.1080206@hp.com> (raw)
In-Reply-To: <1231442701.3893.4.camel@achroite>
>
> I think 0, (u32)(-1) and (u16)(-1) may have to be special-cased as
> unknown, but everything else can be treated as a number of Mbit/s. I
> don't know what a driver should do about an interface that really runs
> at 65.535 Gbit/s though...
Something along these lines then? (assuming my mailer doesn't fubar this
:( - I normally send matches via mailx)
--- ethtool.c.orig 2008-11-17 11:53:40.000000000 -0800
+++ ethtool.c 2009-01-08 11:41:54.000000000 -0800
@@ -813,23 +813,12 @@ static int dump_ecmd(struct ethtool_cmd
fprintf(stdout, " Speed: ");
switch (ep->speed) {
- case SPEED_10:
- fprintf(stdout, "10Mb/s\n");
- break;
- case SPEED_100:
- fprintf(stdout, "100Mb/s\n");
- break;
- case SPEED_1000:
- fprintf(stdout, "1000Mb/s\n");
- break;
- case SPEED_2500:
- fprintf(stdout, "2500Mb/s\n");
- break;
- case SPEED_10000:
- fprintf(stdout, "10000Mb/s\n");
+ case 0:
+ case (u16)(-1):
+ fprintf(stdout, "Unknown! (%i)\n", ep->speed);
break;
default:
- fprintf(stdout, "Unknown! (%i)\n", ep->speed);
+ fprintf(stdout, "%dMb/s\n", ep->speed);
break;
};
If that looks reasonable I'll post a proper one with the apropriate text and such with mailx...
rick jones
next prev parent reply other threads:[~2009-01-08 19:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 2:03 [PATCH] Make possible speeds known to ethtool Rick Jones
2009-01-08 3:14 ` Ben Hutchings
2009-01-08 3:12 ` Jeff Garzik
2009-01-08 19:11 ` Rick Jones
2009-01-08 19:25 ` Ben Hutchings
2009-01-08 19:50 ` Rick Jones [this message]
2009-01-09 13:16 ` [PATCH] ethtool: Support arbitrary speeds Ben Hutchings
2009-01-09 17:55 ` Rick Jones
2009-01-09 18:24 ` Ben Hutchings
2009-01-09 18:40 ` Rick Jones
2009-03-06 11:20 ` Jeff Garzik
2009-03-06 12:27 ` Jeff Garzik
2009-01-09 2:52 ` [PATCH] Make possible speeds known to ethtool Herbert Xu
2009-01-09 3:20 ` Jeff Garzik
2009-03-06 11:19 ` Jeff Garzik
2009-03-06 13:52 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2009-01-09 3:48 Herbert Xu
2009-01-09 3:58 ` Jeff Garzik
2009-01-09 4:19 Herbert Xu
2009-01-09 5:00 ` David Miller
2009-01-09 5:05 ` Jeff Garzik
2009-01-09 5:03 ` Jeff Garzik
2009-01-09 5:15 ` Herbert Xu
2009-01-09 5:30 ` Jeff Garzik
2009-01-09 5:35 ` Herbert Xu
2009-01-09 6:28 ` Jeff Garzik
2009-01-09 6:30 ` Herbert Xu
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=496658EB.1080206@hp.com \
--to=rick.jones2@hp.com \
--cc=bhutchings@solarflare.com \
--cc=jgarzik@pobox.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).