From: Andrew Lunn <andrew@lunn.ch>
To: Tim Harvey <tharvey@gateworks.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: best way to disable ANEG and force ethernet link?
Date: Fri, 21 Jan 2022 22:17:56 +0100	[thread overview]
Message-ID: <YesjBIvlWAm8y0bA@lunn.ch> (raw)
In-Reply-To: <CAJ+vNU1Grqy0qkqz3NiSMwDT=OX3zOpmtXyH78Fq2+mOsAFj4w@mail.gmail.com>
On Fri, Jan 21, 2022 at 09:20:45AM -0800, Tim Harvey wrote:
> Greetings,
> 
> I'm troubleshooting a network issue and am looking for the best way to
> force link speed/duplex without using auto-negotiation.
Hi Tim
man ethtool
       ethtool -s devname [speed N] [lanes N] [duplex half|full]
              [port tp|aui|bnc|mii] [mdix auto|on|off] [autoneg on|off]
              [advertise N[/M] | advertise mode on|off ...]  [phyad N]
              [xcvr internal|external] [wol N[/M] | wol p|u|m|b|a|g|s|f|d...]
              [sopass xx:yy:zz:aa:bb:cc] [master-slave preferred-
              master|preferred-slave|forced-master|forced-slave] [msglvl
              N[/M] | msglvl type on|off ...]
so try
ethtool -s eth42 autoneg off duplex full speed 10
> In case it matters I have two boards that I would like to do this on:
> an IMX8MM with FEC MAC and a CN803X with an RGMII (thunderx) vnic MAC.
> Both have a GPY111 (Intel Xway) PHY.
It does require MAC and PHY support. So you will have to try it and
see. fec_main just calls phy_ethtool_set_link_ksettings. So there is a
good chance this works for the FEC.
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c does not implement
.set_link_ksettings, so you might be out of luck there.
gpy_config_aneg() looks like it does something sensible.
But the devil is in the detail...
   Andrew
next prev parent reply	other threads:[~2022-01-21 21:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 17:20 best way to disable ANEG and force ethernet link? Tim Harvey
2022-01-21 21:17 ` Andrew Lunn [this message]
2022-01-22  9:33 ` Heiner Kallweit
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=YesjBIvlWAm8y0bA@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=tharvey@gateworks.com \
    /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).