Commit df473e18 authored by Mike Hibler's avatar Mike Hibler

Old: make sure we DTRT with 10Gb interfaces and ethtool.

parent edb4ddaf
......@@ -703,15 +703,20 @@ sub os_ifconfig_line($$$$$$$$;$$$)
# this seems to work for returning an error on eepro100
$uplines =
"if $ethtool $iface >/dev/null 2>&1; then\n ";
if ($speed eq '0') {
$uplines .= " $ethtool -s $iface autoneg on\n";
#
# Special cases:
# - '0' means autoneg
# - '1000', aka gigabit, we *must* turn on autoneg--
# it's part of the GbE protocol.
# - '10000', aka 10GE, don't try to set anything
#
if ($speed eq '0' || $speed eq '1000') {
$uplines .= " $ethtool -s $iface autoneg on\n ";
}
elsif ($speed eq '10000') {
$uplines .= " true\n ";
}
else {
# If we're gigabit, we *must* turn on autoneg -- it's part
# of the GbE protocol.
if ($speed eq '1000') {
$uplines .= " $ethtool -s $iface autoneg on\n";
}
$uplines .=
" $ethtool -s $iface autoneg off speed $speed duplex $duplex\n " .
" sleep 2 # needed due to likely bug in e100 driver on pc850s\n ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment