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: <ZmvTS9YI8LACJOND@pengutronix.de>
Date: Fri, 14 Jun 2024 07:21:15 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: 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>,
	stable@...r.kernel.org, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net v1 2/2] net: phy: dp83tg720: get initial master/slave
 configuration

On Thu, Jun 13, 2024 at 09:33:01PM +0200, Andrew Lunn wrote:
> On Thu, Jun 13, 2024 at 08:30:34PM +0200, Oleksij Rempel wrote:
> > Get initial master/slave configuration, otherwise ethtool
> > wont be able to provide this information until link is
> > established. This makes troubleshooting harder, since wrong
> > role configuration would prevent the link start.
> 
> I looked at how genphy_c45_read_status() works. If we have
> phydev->autoneg == AUTONEG_ENABLE then genphy_c45_baset1_read_status()
> is called which sets phydev->master_slave_get. If not AUTONEG_ENABLE
> it calls genphy_c45_read_pma() which ends up calling
> genphy_c45_pma_baset1_read_master_slave().
> 
> So it seems like the .read_status op should be setting master/slave
> each time it is called, and not one time during .config_init.
> 
> What do you think?

Yes, you are right. I verified it:
In case of this driver, .config_init will be executed every time no link
is detected over phy_init_hw() call. If link is detected
genphy_c45_pma_baset1_read_master_slave() is called directly.
It is not directly visible but read_master_slave() will be executed on
every  .read_status.

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ