lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Jan 2022 22:17:56 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Tim Harvey <tharvey@...eworks.com>
Cc:     netdev <netdev@...r.kernel.org>
Subject: Re: best way to disable ANEG and force ethernet link?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ