Hi all,
I'm seeing what I consider a problem with getting link status via
SIOCETHTOOL and the e1000e driver. According to all the data I have and
based on how the e1000/e100/tg3 and any broadcom driver works if I issue
something like the following:
edata.cmd = ETHTOOL_GLINK;
ifr.ifr_data = (caddr_t)&edata;
if (ioctl(mii_socket, SIOCETHTOOL, &ifr) != 0 ){
printf("errno: %d, %s\n", errno, strerror(errno));
} else {
printf("status for %s: 0x%x\n", if_name, edata.data);
}
I would/should get an edata.data value of 1 for link up and 0 for link
down. Here is an example on an interface that uses the tg3 driver:
[root@ ~]# ./test eth0
mii_socket: 3
Proper MII ioctl for eth0 is SIOCETHTOOL.
status for eth0: 0x1
The link is up and I get a 1. Same test on a nic with the e1000e driver
shows:
[root@ ~]# ./test eth4
mii_socket: 3
Proper MII ioctl for eth4 is SIOCETHTOOL.
status for eth4: 0x2
The link is definately up and connected but instead of showing a status
of 1 it give me 2. If I unplug the link it does give me a 0 (as expected).
This seems like a bug, but thats why I'm asking this list.
--
John DeFranco
Hewlett-Packard Company
Availability Clusters Solutions Lab
408-447-7543
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel