netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
To: netdev@vger.kernel.org
Cc: Michal Kubecek <mkubecek@suse.cz>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
Subject: ethtool 5.7: --change commands fail
Date: Sat, 25 Jul 2020 14:43:27 +0300	[thread overview]
Message-ID: <20200725114327.GC125759@manjaro> (raw)

ethtool: v5.7
kernel: v5.4.52
driver: r8169 + libphy

Starting from v5.7, all ethtool --change commands fail to apply and
show the following error message:

$ ethtool -s ens5 autoneg off
netlink error: No such file or directory
Cannot set new settings: No such file or directory
  not setting autoneg

'git bisect' points to:
8bb9a04 (ethtool.c: Report transceiver correctly)

After debugging I found that this commit sets deprecated.transceiver
and then do_ioctl_slinksettings() checks for it and returns -1.
errno is thus invalid and the the error message is bogus.

With debugging enabled:

$ ethtool --debug 0xffff -s ens5 autoneg off
sending genetlink packet (32 bytes):
    msg length 32 genl-ctrl
    CTRL_CMD_GETFAMILY
        CTRL_ATTR_FAMILY_NAME = "ethtool"
<message dump/>
received genetlink packet (52 bytes):
    msg length 52 error errno=-2
<message dump/>
netlink error: No such file or directory
offending message:
    ETHTOOL_MSG_LINKINFO_SET
        ETHTOOL_A_LINKINFO_PORT = 101
Cannot set new settings: No such file or directory
  not setting autoneg

             reply	other threads:[~2020-07-25 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 11:43 Ali MJ Al-Nasrawy [this message]
     [not found] <20200725064936.GB125759@manjaro>
2020-07-25 12:54 ` ethtool 5.7: --change commands fail Michal Kubecek
2020-07-25 15:26   ` علي محمد جبار

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200725114327.GC125759@manjaro \
    --to=alimjalnasrawy@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).