From: Ben Hutchings <bhutchings@solarflare.com>
To: Martin Fuzzey <mfuzzey@gmail.com>
Cc: netdev@vger.kernel.org, nico@cam.org
Subject: Re: [RFC PATCH] Ethtool style in kernel network driver configuration.
Date: Thu, 11 Jun 2009 03:02:48 +0100 [thread overview]
Message-ID: <1244685768.4616.22.camel@deadeye> (raw)
In-Reply-To: <20090610173243.17262.91308.stgit@srv002.fuzzey.net>
On Wed, 2009-06-10 at 19:34 +0200, Martin Fuzzey wrote:
> Allow network drivers to be configured by the kernel
> in the same way as the userspace "ethtool" program as suggested
> by Nicolas Pitre in a recent mailing list discussion.
>
> Two methods are possible, selected by KConfig:
>
> 1) Kernel parameter (net_ethconfig.ethtool)
> which accepts (most of) the same arguments as "ethtool -s"
>
> net_ethconfig.ethtool="eth0 speed 10 duplex full"
>
> The wol, sopass and msglvl parameters are not (yet?) supported.
Who needs this feature? Why not use ethtool in an initramfs?
> 2) Programatic configuration via a new function
> neteth_configure_interface() (typically from board specific setup code):
>
> #include <linux/net-ethconfig.h>
> static struct neteth_if_config force_10mbps = {
> .etool_cmd = {
> .speed = SPEED_10,
> .duplex = DUPLEX_FULL,
> },
> .set_flags = NETCONF_SET_SPEED | NETCONF_SET_DUPLEX,
> };
> ...
> neteth_configure_interface("eth0", &force_10mbps);
>
> The programatic method may be required in certain embedded situations
> (for example when different hardware revisions require different
> configurations and the hardware revision can be detected by software).
[...]
Forcing speed and duplex is occasionally needed to work around a link
partner that doesn't implement autonegotiation correctly. I don't see
that it should ever be needed in platform configuration. If the driver
doesn't detect the MAC/PHY capabilities correctly then the driver should
be fixed. Overriding the settings once will not prevent an unsupported
mode being selected later.
I can see that it may be useful to set the PHY type and address from
platform code, but I don't know how many drivers for current hardware
can cope with having those changed after initialisation.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2009-06-11 2:02 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-10 17:34 [RFC PATCH] Ethtool style in kernel network driver configuration Martin Fuzzey
2009-06-10 18:02 ` Joe Perches
2009-06-11 2:02 ` Ben Hutchings [this message]
2009-06-11 3:55 ` Nicolas Pitre
2009-06-11 6:47 ` Martin Fuzzey
2009-06-11 14:54 ` Ben Hutchings
2009-06-11 16:22 ` Nicolas Pitre
2009-06-11 16:52 ` Ben Hutchings
2009-06-11 17:44 ` Nicolas Pitre
2009-06-11 18:29 ` Ben Hutchings
2009-06-11 19:08 ` Nicolas Pitre
2009-06-11 19:31 ` Ben Hutchings
2009-06-11 20:24 ` Nicolas Pitre
2009-06-11 20:48 ` Ben Hutchings
2009-06-11 21:39 ` Martin Fuzzey
2009-06-12 0:15 ` David Miller
2009-06-12 0:38 ` Nicolas Pitre
2009-06-12 2:57 ` David Miller
2009-06-11 17:45 ` Martin Fuzzey
2009-06-12 0:09 ` David Miller
2009-06-12 10:50 ` Mark Brown
2009-06-12 11:33 ` David Miller
2009-06-12 12:24 ` Mark Brown
2009-06-13 0:01 ` David Miller
2009-06-13 17:10 ` Mark Brown
2009-06-12 12:19 ` Martin Fuzzey
2009-06-13 0:01 ` David Miller
2009-06-13 7:00 ` Martin Fuzzey
2009-06-13 7:07 ` David Miller
2009-06-13 7:51 ` Martin Fuzzey
2009-06-13 8:07 ` David Miller
2009-06-13 9:29 ` Martin Fuzzey
2009-06-14 18:39 ` Martin Fuzzey
2009-06-12 0:07 ` David Miller
2009-06-12 0:03 ` 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=1244685768.4616.22.camel@deadeye \
--to=bhutchings@solarflare.com \
--cc=mfuzzey@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nico@cam.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 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.