All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active directly, instead of phy_init_eee
@ 2025-03-11  6:39 Heiner Kallweit
  2025-03-11 12:41 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2025-03-11  6:39 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David Miller,
	Eric Dumazet, Paolo Abeni, Jakub Kicinski
  Cc: netdev@vger.kernel.org

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@gmail.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-11 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11  6:39 [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active directly, instead of phy_init_eee Heiner Kallweit
2025-03-11 12:41 ` Andrew Lunn
2025-03-11 13:05   ` Heiner Kallweit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.