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-next>] [day] [month] [year] [list]
Message-ID: <1c1a5c49-8c9c-42a7-b087-4a84d3585e0d@gmail.com>
Date: Tue, 11 Mar 2025 07:39:33 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
 Andrew Lunn <andrew@...n.ch>, 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>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active
 directly, instead of phy_init_eee

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;
 
 	b53_eee_enable_set(ds, port, true);
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ