[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#496647: netcfg: ethtool-lite incorrectly reports status of e1000e iface on HP 2510p



Package: netcfg
Version: 1.44

On my HP 2510p netcfg offers the wireless interface as default even if the 
wired e1000e interface has a cable connected (and even though I did not 
load the firmware for the wireless).

Reason is that the changelog has:
INFO: eth0 is disconnected. (MII)

I compiled ethtool-lite.c with TEST set and the result when running that 
in the D-I environment was surprising.

<CABLE IS CONNECTED>
# modprobe -r e1000e
# modprobe e1000e
# ./ethtool-lite eth0
eth0 is connected.
# ip link set eth0 up
# ./ethtool-lite eth0
eth0 is disconnected. (MII)
# ./ethtool-lite eth0
eth0 is connected.
# ip link set eth0 down
# ./ethtool-lite eth0
eth0 is connected. (MII)
# ip link set eth0 up
# ./ethtool-lite eth0
eth0 is connected.
<REMOVE THE NETWORK CABLE>
# ./ethtool-lite eth0
eth0 is connected. (MII)
# ip link set eth0 down
# ./ethtool-lite eth0
eth0 is connected. (MII)

Note the randomly (?) appearing/disappearing "(MII)" and the fact that 
after the first "link up" the interface is first reported as disconnected 
while after pulling the cable the status remains connected.

After some more testing it looks like the first issue could be solved by a 
longer pause in netcfg.c after bringing the interface up and before 
calling ethtool-lite. Changing usleep(250) to sleep(2) resulted in 
correct selection of the default (a sleep of 1 was not enough).

Disadvantage is that that also results in a very long delay from a user 
PoV if other interfaces (in my case bluetooth and wireless) are tested 
first as each interface is brought up separately and has the sleep 
separately.

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: