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: <ZcKD69vLxYkbvAL-@gaggiata.pivistrello.it>
Date: Tue, 6 Feb 2024 20:09:31 +0100
From: Francesco Dolcini <francesco@...cini.it>
To: Andrew Lunn <andrew@...n.ch>
Cc: Francesco Dolcini <francesco@...cini.it>,
	Wolfram Sang <wsa+renesas@...g-engineering.com>,
	linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org,
	Francesco Dolcini <francesco.dolcini@...adex.com>,
	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>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] net: phy: micrel: reset KSZ9x31 when resuming

On Tue, Feb 06, 2024 at 06:57:37PM +0100, Andrew Lunn wrote:
> On Tue, Feb 06, 2024 at 06:26:45PM +0100, Francesco Dolcini wrote:
> > On Wed, Jan 17, 2024 at 02:33:53PM +0100, Wolfram Sang wrote:
> > > Makes sense? Tests work fine here, at least.
> > 
> > What I do not know, is what happen to any configuration that was done to
> > the phy before.
> 
> I'm assuming here WoL was not enabled, so the PHY did actually
> suspend.
> 
> mdio_bus_phy_suspend() calls phy_stop_machine() which will set the
> state of the PHY to UP.
> 
> During resume mdio_bus_phy_resume() calls phy_init_hw(). That should
> do a soft reset, call the config_init() callback, and configure
> interrupts. After that phy_resume() is called and then
> phy_state_machine(). Do to setting the state to UP, the state machine
> will kick off auto-negotiation, which will cause any auto-neg
> parameters to be written to the PHY.
> 
> > What if you have disabled gigabit ethernet from auto negotiation before
> > suspend, it will be enabled again after the phy get out of reset.
> 
> If you have set in fixed mode, the wrongly named phy_config_aneg()
> will set the fixed modes, same as it would set the auto-neg modes. So
> they should be preserved over suspend/resume.

Thanks for the detailed explanation Andrew.

What if the configuration was done using ethtool?

Francesco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ