netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Fuzzey <mfuzzey@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: bhutchings@solarflare.com, nico@cam.org, netdev@vger.kernel.org
Subject: Re: [RFC PATCH] Ethtool style in kernel network driver configuration.
Date: Sat, 13 Jun 2009 09:51:38 +0200	[thread overview]
Message-ID: <4A335A8A.5080907@gmail.com> (raw)
In-Reply-To: <20090613.000729.118500646.davem@davemloft.net>

David Miller wrote:
> I misunderstood the problem, thanks for asking me to clarify
> this.
>
> I thought the issue was the "in the environment where his devices
> would be used" he wanted to force a certain link speed and duplex
> setting.  In that case, forcing the link via ethtool is appropriate
> because it's an attribute of where the device is connected.
>   
Well I thought my initial post (in the smc91x force speed thread before
this patch was written) was quite unambiguous as to my motivation :

I am using the SMC91x driver on a based ARM board that has a hardware
problem causing 100Mbps mode not to work (even though the PHY
negotiates to that speed).


That being said even if this is _my_ use case the facility is equally
useful for the use case you understood (and yes you could use ethtool
from userspace/initramfs/initscript to do that but you've already
accepted the idea of an in kernel ethtool for the "environment" case).
> But the situation is different, the physical hardware has a limitation
> and know of this belongs, or should be described, in the driver
> somehow.
>   
Theoretically I agree. However the only practical advantage I can see of
doing it in the driver is that it is then impossible to later re-enable
broken modes. The proposed patch would allow you to later mess up
networking but requires :
1) ethtool installed on the device
2) root access to the device

If you have root access there are all manner of ways you can mess up the
system and breaking networking probably comes quite a way down the list.

If you want to do it in the driver for this usecase either it's back to
everyone for himself quick hacks or we need to add an interface to _all_
the drivers. How long would that take? How long did ethtool take? Given
the trouble this very non intrusive patch is having would you really
accept a patch to all the network drivers for this? I for one wouldn't
do it as I don't have all that hardware to test.

Even if we did go the "purist" route and add an interface to all the
drivers this patch would still be useful for the other usecase (the one
you understood).

So my argument is that while this patch is not the purist solution for
my usecase I consider it an acceptable solution (better than hacks) and
a good solution for other usecases.

Martin



  reply	other threads:[~2009-06-13  7:51 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
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 [this message]
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=4A335A8A.5080907@gmail.com \
    --to=mfuzzey@gmail.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --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 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).