2003-11-27 13:02:55

by Rene Engelhard

[permalink] [raw]
Subject: 2.6.0-test11: MII broken?

[ please Cc: me as I am not subscribed ]

Hi,

I wondered why my automatic network detection with whereami doesn't
work anymore. Now I found it:

rene@frodo:~$ sudo mii-tool eth0
SIOCGMIIPHY on 'eth0' failed: Operation not supported

rene@frodo:~$ sudo strace mii-tool eth0
set_thread_area({entry_number:-1 -> 6, base_addr:0x40147460,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x40001000, 52493) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, 0x89f0, 0x804a3e0) = -1 EOPNOTSUPP (Operation not
supported)
write(2, "SIOCGMIIPHY on \'eth0\' failed: Op"..., 54SIOCGMIIPHY on
'eth0' failed: Operation not supported
) = 54
close(3) = 0
exit_group(1) = ?

rene@frodo:~$ sudo ltrace mii-tool eth0
getopt_long(2, 0xbffff8a4, "A:F:p:lrRvVw?", 0x0804a0e0, NULL) = -1
socket(2, 2, 0) = 3
strncpy(0x0804a3e0, "eth0", 16) = 0x0804a3e0
ioctl(3, 35312, 0x0804a3e0) = -1
__errno_location() = 0x40147440
strerror(95) = "Operation not
supported"
fprintf(0x4013ce60, "SIOCGMIIPHY on '%s' failed: %s\n", "eth0",
"Operation not supported"SIOCGMIIPHY on 'eth0' failed: Operation not
supported
) = 54
close(3) = 0
+++ exited (status 1) +++

So testmii in whereami fails to detect that eth0 is plugged in and has
a link...

CONFIG_MII=y -- config is attached; the system is up to date Debian
unstable with glibc 2.3.2 (TLS and NPTL).
If you need more info, ask.

Gr??e/Regards,

Ren


Attachments:
(No filename) (0.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2003-11-27 15:36:06

by Thomas Winischhofer

[permalink] [raw]
Subject: Re: 2.6.0-test11: MII broken?


Rene,

this is a known bug in mii-tool, at least in Debian's version.

mii-tool uses old ioctl numbers which were kept in 2.4 (for
compatibility issues?) but were removed in 2.6.

The solution is to get the source code, patch mii.h to the correct
values for the SIG... "#define"s (which are found in
/usr/src/linux/include somewhere, do a grep), and to recompile.

Thomas

--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net *** http://www.winischhofer.net/
twini AT xfree86 DOT org




2003-11-27 19:58:41

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: 2.6.0-test11: MII broken?

On Thu, 27 Nov 2003, Rene Engelhard wrote:

> [ please Cc: me as I am not subscribed ]
>
> Hi,
>
> I wondered why my automatic network detection with whereami doesn't
> work anymore. Now I found it:
>
> rene@frodo:~$ sudo mii-tool eth0
> SIOCGMIIPHY on 'eth0' failed: Operation not supported

Try upgrading your mii-tool