On 8/25/06, Bill Fink <[EMAIL PROTECTED]> wrote:
On Thu, 24 Aug 2006, Michael Chan wrote:
> Jeff Kirsher wrote:
>
> > The old way of setting autonegotiation was using the
> > following command:
> > ethtool -s ethx speed 100 duplex full auto on
> > now the command would be
> > ethtool -s ethx auto on advertise 0x08
> > both commands would result in only advertising 100 FULL.
> >
> > There still needs to be a change made to the man file to reflect the
> > change in the behavior of ethtool, which I have not done. But this
> > patch will allow for greater flexibility in setting autonegotiation
> > speeds.
>
> It is more flexible, but less intuitive. The user now has to
> remember hex values instead of the more intuitive speed and
> duplex. Perhaps we can keep the old method of using speed and
> duplex, while adding the new method of specifying hex values?
I agree. Something like:
ethtool -s ethx auto on advertise mode1+mode2+...+moden
For example:
ethtool -s ethx auto on advertise 100-half+100-full
to set speed 100 either half or full duplex.
Maybe have some abbreviations such as 100-all (same as above) or
all-half (for all supported half duplex) or just all (for all supported
modes), which I suppose is the default.
Just an idea.
-Bill
I agree that using a hex value is less intuitive, but with proper
documentation in the man file it would be easily understood. It is
also easier to state
ethtool -s ethx autoneg on advertise 0x0F
than it would be to do:
ethtool -s ethx autoneg on advertise 100-half+100-full+10-half+10-full
Not that it is impossible to do, but the code to do the parsing would
not be as clean as it is to use a hex value. Currently ethtool
already uses numeric values for messagelevel, phyad and sopass. So I
am not suggesting something completely new. I have already submitted
a patch to keep the old functionality while adding the new. Only
thing left for this is to create the manual documentation so that
users can easily understand how to use the functionality.
10-half = 0x01
10-full = 0x02
100-half = 0x04
100-full = 0x08
1000-half = 0x10 (actually not supported by IEEE standards)
1000-full = 0x20
auto = 0x00 or 0x3F
In addition the code already tests the value that the user enters with
what is supported and only displays the supported values.
--
Cheers,
Jeff
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html