Skip to contentSkip to conversation

mii-tool support for gmac/sungem

DISCUSSION Bastien Nocera 3 participants 5 messages Sep 22, 2002 – Sep 23, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

I wanted to know if mii-tool was supposed to work with the gmac/sungem card in the iBook2 laptops. I tried it out:

$ sudo mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found

I see code for this ioctl in the kernel though in gem_ioctl (drivers/net/sungem.c) and some messages that seem relevant in dmesg:

eth0: MII PHY ID: 4061e0 BCM 5221
eth0: switching to forced 100bt
eth0: switching to forced 10bt
etc.

Any ideas ?

Cheers

--
/Bastien Nocera
http://hadess.net

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 13 lines · Bastien Nocera

Hello,

I wanted to know if mii-tool was supposed to work with the gmac/sungem card in the iBook2 laptops. I tried it out:

$ sudo mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found

I see code for this ioctl in the kernel though in gem_ioctl (drivers/net/sungem.c) and some messages that seem relevant in dmesg:

Quoted 6 lines

eth0: MII PHY ID: 4061e0 BCM 5221
eth0: switching to forced 100bt
eth0: switching to forced 10bt
etc.

Any ideas ?

use ethtool...

Jeff

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 20 lines · Jeff Garzik
Quoted 18 lines · Bastien Nocera

Hello,

I wanted to know if mii-tool was supposed to work with the gmac/sungem card in the iBook2 laptops. I tried it out:

$ sudo mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found

I see code for this ioctl in the kernel though in gem_ioctl (drivers/net/sungem.c) and some messages that seem relevant in dmesg:

eth0: MII PHY ID: 4061e0 BCM 5221
eth0: switching to forced 100bt
eth0: switching to forced 10bt
etc.

Quoted 4 lines
Quoted 1 line

Any ideas ?

use ethtool...

Rock, it works. Does ethtool work for every card for which the driver has an MII interface ?

Thanks

--
/Bastien Nocera
http://hadess.net

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 3 lines

Rock, it works. Does ethtool work for every card for which the driver has an MII interface ?

Except that on pmacs, the interface is powered down about 10 seconds after you ifconfig it down. This is good for power management of laptops obviously but means you won't be able to probe for the link status at that point.

Worse (my fault), sungem in the official tree has a bug that will cause it to still try to bang the HW if you use the mii ioctls while the HW is down, thus causing machine check oops'es (that is fixed in my tree, I still have to send the patch to DaveM)

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
In reply to Bastien Nocera
Quoted 22 lines · Bastien Nocera
Quoted 20 lines · Jeff Garzik
Quoted 18 lines · Bastien Nocera

Hello,

I wanted to know if mii-tool was supposed to work with the gmac/sungem card in the iBook2 laptops. I tried it out:

$ sudo mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found

I see code for this ioctl in the kernel though in gem_ioctl (drivers/net/sungem.c) and some messages that seem relevant in dmesg:

eth0: MII PHY ID: 4061e0 BCM 5221
eth0: switching to forced 100bt
eth0: switching to forced 10bt
etc.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Any ideas ?

use ethtool...

Rock, it works. Does ethtool work for every card for which the driver has an MII interface ?

not yet... I still need to add fallback code to ethtool, that lets it speak low-level MII [older drivers] as well as the newer ethtool [newer drivers].

Jeff

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/