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: <ZwZu6rCtKf-A165a@makrotopia.org>
Date: Wed, 9 Oct 2024 12:54:18 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: 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
Subject: Re: [PATCH net-next 1/3] net: phy: realtek: read duplex and gbit
 master from PHYSR register

On Wed, Oct 09, 2024 at 11:01:59AM +0100, Russell King (Oracle) wrote:
> On Wed, Oct 09, 2024 at 02:53:03AM +0100, Daniel Golle wrote:
> > -static void rtlgen_decode_speed(struct phy_device *phydev, int val)
> > +static void rtlgen_decode_physr(struct phy_device *phydev, int val)
> >  {
> > -	switch (val & RTLGEN_SPEED_MASK) {
> > +	/* bit 2
> > +	 * 0: Link not OK
> > +	 * 1: Link OK
> > +	 */
> > +	phydev->link = !!(val & RTL_VND2_PHYSR_LINK);
> 
> Be careful with this. The link status bit in the BMSR is latched-low,
> meaning that it guarantees to inform the reader that the link failed at
> some point between the preceding read and current read.
> 
> This is important to know, so code can react to a possibly different
> negotiation result (we must see a link-fail to recognise a different
> set of negotiation results.)

The datasheet calls that bit "Real Time Link Status".
If you think we should not use it, I will drop it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ