Package: ethtool Version: 1:4.8-1+b1 Severity: normal Dear Maintainer,
Context: I want my Ethernet card to autonegociate only up to 100Mbps. This used to only require a small modification to if-up.d/ethtool, described in https://bugs.debian.org/760771 The bug: ethtool seems to ignore the "advertise" parameter, if "autoneg" is also provided. See example below. Thanks. jmranger@PC:~$ sudo ethtool eno1 [sudo] password for jmranger: Settings for eno1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on (auto) Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes jmranger@PC:~$ sudo ethtool --change eno1 advertise 0x000F autoneg on jmranger@PC:~$ sleep 10 jmranger@PC:~$ sudo ethtool eno1 Settings for eno1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: off (auto) Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes jmranger@PC:~$ sudo ethtool --change eno1 advertise 0x000F jmranger@PC:~$ sleep 10 jmranger@PC:~$ sudo ethtool eno1 Settings for eno1: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on MDI-X: on (auto) Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000007 (7) drv probe link Link detected: yes jmranger@PC:~$ -- System Information: Debian Release: 9.1 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory ANSI_X3.4-1968), LANGUAGE= (charmap=locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages ethtool depends on: ii libc6 2.24-11+deb9u1 ethtool recommends no packages. ethtool suggests no packages. -- Configuration Files: /etc/network/if-up.d/ethtool changed: ETHTOOL=/sbin/ethtool test -x $ETHTOOL || exit 0 [ "$IFACE" != "lo" ] || exit 0 gather_settings () { set | sed -n " /^IF_$1[A-Za-z0-9_]*=/ { h; # hold line s/^IF_$1//; s/=.*//; s/_/-/g; # get name without prefix y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/; # lower-case p; g; # restore line s/^[^=]*=//; s/^'\(.*\)'/\1/; # get value p; }" } SETTINGS="\ ${IF_LINK_SPEED:+ speed $IF_LINK_SPEED}\ ${IF_LINK_DUPLEX:+ duplex $IF_LINK_DUPLEX}\ " set -- $IF_ETHERNET_WOL SETTINGS="$SETTINGS${1:+ wol $1}${2:+ sopass $2}" case "$IF_ETHERNET_AUTONEG" in '') ;; on|off) SETTINGS="$SETTINGS autoneg $IF_ETHERNET_AUTONEG" ;; *) SETTINGS="$SETTINGS autoneg on advertise $IF_ETHERNET_AUTONEG" ;; esac [ -z "$SETTINGS" ] || $ETHTOOL --change "$IFACE" $SETTINGS $ETHTOOL --change "$IFACE" advertise 0x000F SETTINGS="$(gather_settings ETHERNET_PAUSE_)" [ -z "$SETTINGS" ] || $ETHTOOL --pause "$IFACE" $SETTINGS SETTINGS="$(gather_settings HARDWARE_IRQ_COALESCE_)" [ -z "$SETTINGS" ] || $ETHTOOL --coalesce "$IFACE" $SETTINGS SETTINGS="$(gather_settings HARDWARE_DMA_RING_)" [ -z "$SETTINGS" ] || $ETHTOOL --set-ring "$IFACE" $SETTINGS SETTINGS="$(gather_settings OFFLOAD_)" [ -z "$SETTINGS" ] || $ETHTOOL --offload "$IFACE" $SETTINGS -- debconf information excluded