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] [day] [month] [year] [list]
Message-ID: <9cb3808d-341d-4db2-90c9-12bf412d4a48@lunn.ch>
Date: Fri, 7 Nov 2025 17:18:01 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Marek Vasut <marex@...x.de>, Wei Fang <wei.fang@....com>,
	Clark Wang <xiaoning.wang@....com>
Subject: Re: [PATCH v2 net-next 6/6] net: phy: realtek: create
 rtl8211f_config_phy_eee() helper

> It's good you point this out. Somehow, among all transformations, I lost
> along the way the fact that the soft reset is necessary for disabling
> clkout on RTL8211F, not for PHY-mode EEE :-/
> https://elixir.bootlin.com/linux/v6.16.12/source/drivers/net/phy/realtek/realtek_main.c#L598
> 
> I checked the RTL8211F datasheet and it doesn't say that changes to the
> "PHY-mode EEE Enable" field would need a write to 0.15 to take effect.
> But it does say that about "CLKOUT Source".
> 
> Curiously, the RTL8211FVD datasheet doesn't suggest that modifying the
> CLKOUT source needs a soft reset when providing the steps to do so.
> 
> Anyway, this code transformation from patch 6/6 is not buggy per se
> (even if we change the CLKOUT on RTL8211F, we still get the
> genphy_soft_reset() that we need), but very misleading and confusing.
> 
> pw-bot: cr
> 
> > For the Marvell PHYs, lots of registers need a soft reset to put
> > changes into effect. I would not want to hide the soft reset inside a
> > helper, because of the danger more calls to helps are added
> > afterwards.
> 
> Ok, I get your point and I agree, but what to do?

If only the clk out that needs it, i would put it in the clock out
helper.

Is a soft reset expensive? Is a soft reset destructive? The marvell
one is both fast and does not seem to change any registers, it just
activates changes.

If you think some other registers might need it, i would probably just
do it unconditionally after all the configuration, assuming it is
cheap and non-destructive. Maybe add a comment that at least clk out
needs its, but other registers might need it as well?

      Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ