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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z02oTJgl1Ldw8J6X@shell.armlinux.org.uk>
Date: Mon, 2 Dec 2024 12:30:04 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Nikita Yushchenko <nikita.yoush@...entembedded.com>
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
	Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Michael Dege <michael.dege@...esas.com>,
	Christian Mardmoeller <christian.mardmoeller@...esas.com>,
	Dennis Ostermann <dennis.ostermann@...esas.com>
Subject: Re: [PATCH] net: phy: phy_ethtool_ksettings_set: Allow any supported
 speed

On Mon, Dec 02, 2024 at 04:09:43PM +0500, Nikita Yushchenko wrote:
> > > Right now, 'ethtool -s tsn0 master-slave forced-slave' causes a call to
> > > driver's ethtool set_link_ksettings method. Which does error out for me
> > > because at the call time, speed field is 2500.
> > 
> > Are you saying that the PHY starts in fixed-speed 2.5G mode?
> > 
> > What does ethtool tsn0 say after boot and the link has come up but
> > before any ethtool settings are changed?
> 
> On a freshly booted board, with /etc/systemd/network temporary moved away.
> 
> (there are two identical boards, connected to each other)
> 
> root@...-033:~# ip l show dev tsn0
> 19: tsn0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
>     link/ether 3a:e3:5c:56:ba:bd brd ff:ff:ff:ff:ff:ff
> 
> root@...-033:~# ethtool tsn0
> Settings for tsn0:
>         Supported ports: [ MII ]
>         Supported link modes:   2500baseT/Full
>         Supported pause frame use: Symmetric Receive-only
>         Supports auto-negotiation: No

Okay, the PHY can apparently only operate in fixed mode, although I
would suggest checking that is actually the case. I suspect that may
be a driver bug, especially as...

>         Supported FEC modes: Not reported
>         Advertised link modes:  2500baseT/Full
>         Advertised pause frame use: No
>         Advertised auto-negotiation: No
>         Advertised FEC modes: Not reported
>         Speed: 2500Mb/s
>         Duplex: Unknown! (255)

... after link up:

>         Speed: 2500Mb/s
>         Duplex: Full

it changes phydev->duplex, which is _not_ supposed to happen if
negotiation has been disabled.

When negitation is disabled, phydev->speed and phydev->duplex are
supposed to set the link parameters, and the PHY driver is not
supposed to alter them from what was set, possibly by the user.

So there is something weird going on in the driver, and without
seeing it, I'm not sure whether (a) it's just a badly coded driver
that the PHY does support AN but the driver has decided to tell the
kernel it doesn't, (b) whether it truly is not using AN.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ