Re: PATCH: ethtool MII helpers

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Jun 22 2001 - 00:58:37 EST


Chris Wedgwood wrote:
>
> On Fri, Jun 22, 2001 at 01:24:36AM -0400, Jeff Garzik wrote:
>
> Sure, and that's planned. Wanna send me a patch for it? :)
>
> Possibly, but I wonder if this is a kernel-space problem or not. Why
> not put all the smarts into userland for it?

I meant, send me a patch for userland ethtool, to do exactly what you
described.

> It will definitely fall back on the MII ioctls if ethtool media
> support for the desired command doesn't exist.
>
> Well, that is more or less as much as needs to be done. That, and
> some kind of super-set API to be defined for all new stuff, having
> two slightly different APIs for the same things sucks.

Both APIs do different things but have a common subset, yes.

The MII ioctls only do their thing for MII-like hardware. ethtool can
be applied to any hardware. Old ISA drivers that don't do MII, or do it
in a really nonstandard way. For example I have ethtool code locally
which allows ne2k-pci to do media selection via ioctl, for two popular
ne2k cards, something its never been able to do before. Emulating media
selection support for things like 10base2<->10baseT<->AUI just isn't
possible with the MII ioctls.

MII is a standard and incredibly popular, thus mii-tool works most
popular PCI NICs, for the most popular media types. But it's still
basically a hardware interface. I am not convinced its a good idea for
make the [G]MII ioctls the Linux software media interface for all
network hardware.

I see ethtool as the interface for tuning your NIC, that works across
all hardware.
I see mii-diag as the way to do advance MII-specific hardware stuff,
like next page or HA monitoring or whatever.

        Jeff

-- 
Jeff Garzik      | Andre the Giant has a posse.
Building 1024    |
MandrakeSoft     |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 23 2001 - 21:00:37 EST