From: Jeff Garzik <jgarzik@pobox.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Rick Jones <rick.jones2@hp.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] ethtool: Support arbitrary speeds
Date: Fri, 06 Mar 2009 06:20:53 -0500 [thread overview]
Message-ID: <49B10715.3050900@pobox.com> (raw)
In-Reply-To: <1231506974.3006.18.camel@achroite>
Ben Hutchings wrote:
> The speed and speed_hi fields of struct ethtool_cmd together represent
> a value in units of Mbit/s. The valid speed settings are hardware-
> dependent and should be checked by the driver. Remove our validation
> and allow arbitrary positive values. Continue to report 0 and -1 as
> "Unknown!" since some drivers will report these invalid values when
> the link is down.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> On Thu, 2009-01-08 at 11:50 -0800, Rick Jones wrote:
>>> 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)
>
> That's kind of incomplete. Here's my attempt.
>
> In a quick test I found that the tg3 driver *doesn't* validate the speed
> setting if autonegotiation is off, and will accept and report back e.g.
> 99. But this patch doesn't create a new problem as you could already
> set it to the unsupported speeds of 2500 and 10000.
>
> Ben.
>
> ethtool.8 | 4 ++--
> ethtool.c | 42 ++++++++++--------------------------------
> 2 files changed, 12 insertions(+), 34 deletions(-)
ACK, can you rediff against current git repo?
next prev parent reply other threads:[~2009-03-06 11:21 UTC|newest]
Thread overview: 16+ 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
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 [this message]
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
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=49B10715.3050900@pobox.com \
--to=jgarzik@pobox.com \
--cc=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.