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: <ec50da60-dde3-45ca-aa6c-eebf59fc5ec5@lunn.ch>
Date: Tue, 11 Mar 2025 13:41:12 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
	Vladimir Oltean <olteanv@...il.com>,
	David Miller <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Jakub Kicinski <kuba@...nel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active
 directly, instead of phy_init_eee

On Tue, Mar 11, 2025 at 07:39:33AM +0100, Heiner Kallweit wrote:
> Use genphy_c45_eee_is_active directly instead of phy_init_eee,
> this prepares for removing phy_init_eee. With the second
> argument being Null, phy_init_eee doesn't initialize anything.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
>  drivers/net/dsa/b53/b53_common.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 61d164ffb..17e3ead16 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -2212,10 +2212,7 @@ EXPORT_SYMBOL(b53_mirror_del);
>   */
>  int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
>  {
> -	int ret;
> -
> -	ret = phy_init_eee(phy, false);
> -	if (ret)
> +	if (!phy->drv || genphy_c45_eee_is_active(phy, NULL) <= 0)
>  		return 0;

genphy_c45_eee_is_active() is a function which could be considered
phylib internal. At least, it currently has no users outside of the
phylib core.

b53 uses phylink not phylib, so i actually think it would be better to
convert it to the phylink way to do EEE, rather than make use of a
phylib helper.

	Andrew

	

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ