[eepro100] mii-diag strangeness
Donald Becker
becker@scyld.com
Thu May 9 19:31:02 2002
On 9 May 2002, Joe Rouvier wrote:
> On Wed, 2002-05-08 at 19:50, Donald Becker wrote:
> > On 8 May 2002, Joe Rouvier wrote:
> >
> > > I'm having a strange problem with mii-diag on IBM Netfinity 4000R's. It
> > > seems that mii-diag works fine as a non-root user, but reads all nulls
> > > when run as root,
...
> I did some more checking on this. It seems my earlier assumptions were
> incorrect. Mii-diag fails on both the Network Engines and the IBMs, but
> only with the latest version, v2.02 is fine:
OK, that explains part of the problem.
The MII ioctl() constants were changed for the 2.4 kernel. Yes, the
symbolic name that was supposed to represent a constant changed value
yet kept the same name.
The v2.02 'mii-diag' program always uses the symbolic constant, which
now changes depending on the system that it's compiled on.
The v2.03 'mii-diag' program tries both the new and old symbolic
values. If the new value seems to return valid data, it uses the new,
otherwise it uses the old.
I've updated 'mii-diag' so that passing the '-v' flag will report which
value is being used. Look for this in v2.04.
What driver and kernel version are you using?
> mii-diag.c:v2.03 11/5/2001 Donald Becker (becker@scyld.com)
> Basic registers of MII PHY #0: 0000 0000 0000 0000 0000 0000 0000 0000.
...
> mii-diag.c:v2.02 5/21/2001 Donald Becker (becker@scyld.com)
> Basic registers of MII PHY #1: 3000 782d 02a8 0154 05e1 41e1 0001 0000.
Note that 2.03 is trying to read PHY #0, not PHY #1.
--
Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Second Generation Beowulf Clusters
Annapolis MD 21403 410-990-9993