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: <af7daf2e-7a8a-4a83-902a-28c9375daea3@lunn.ch>
Date: Sat, 24 Jan 2026 19:38:53 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Bjørn Mork <bjorn@...k.no>
Cc: netdev@...r.kernel.org, "Lucien.Jheng" <lucienzx159@...il.com>,
	Daniel Golle <daniel@...rotopia.org>,
	Vladimir Oltean <vladimir.oltean@....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: [PATCH net-next v2 1/3] net: phy: air_en8811h: factor out
 shareable code

On Sat, Jan 24, 2026 at 05:55:05PM +0100, Bjørn Mork wrote:
> Andrew Lunn <andrew@...n.ch> writes:
> 
> >> -static int en8811h_read_status(struct phy_device *phydev)
> >> +static int en8811h_get_lpa(struct phy_device *phydev)
> >>  {
> >> -	struct en8811h_priv *priv = phydev->priv;
> >> -	u32 pbus_value;
> >> -	int ret, val;
> >> +	int ret;
> >>  
> >>  	ret = genphy_update_link(phydev);
> >>  	if (ret)
> >
> > This call to genphy_update_link() means this function is doing more
> > than en8811h_get_lpa() would imply.
> >
> > It is hard to see from just the patch, but it also seems to set the
> > state in phydev back to unknown defaults, and read the master/slave
> > status?
> >
> > So i think it needs a better name.
> 
> Yes, that was my feeling too. Just couldn't think of any.  So I took the
> lazy route.  You wouldn't happen to have a suggestion?

Maybe a different strategy. Most of read_status is generic, it appears
just reading lpa is specific to the device. So have a generic
read_status() function, and then use phy_id_compare() to call the
needed device specific function.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ