[PATCH v1 2/2] net: ksz9477: do not advertise EEE support

Oleksij Rempel o.rempel at pengutronix.de
Fri Aug 11 04:53:25 PDT 2023


Do not advertise EEE support for all ksz9477 based chips. EEE needs
proper handling which we can't guarantee with limited resources.

At same time remove wrong comment and Gbit check. EEE is not coupled to
Gbit and KSZ8565 supports EEE as well. So, it seems like there is
nothing right on this comment.

Signed-off-by: Oleksij Rempel <o.rempel at pengutronix.de>
---
 drivers/net/ksz9477.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
index a6a8144479..9665e0f723 100644
--- a/drivers/net/ksz9477.c
+++ b/drivers/net/ksz9477.c
@@ -175,12 +175,6 @@ static void ksz9477_phy_errata_setup(struct ksz_switch *priv, int port)
 	 */
 	ksz9477_port_mmd_write(priv, port, 0x1c, 0x04, 0x00d0);
 
-	/* Energy Efficient Ethernet (EEE) feature select must
-	 * be manually disabled (except on KSZ8565 which is 100Mbit)
-	 */
-	if (priv->features & GBIT_SUPPORT)
-		ksz9477_port_mmd_write(priv, port, 0x07, 0x3c, 0x0000);
-
 	/* Register settings are required to meet data sheet
 	 * supply current specifications
 	 */
@@ -269,6 +263,8 @@ static int ksz_port_setup(struct ksz_switch *priv, int port,
 		if (priv->features & KSZ9477_PHY_ERRATA)
 			ksz9477_phy_errata_setup(priv, port);
 
+		ksz9477_port_mmd_write(priv, port, 0x07, 0x3c, 0x0000);
+
 		ksz_pwrite16(priv, port, 0x100 + (MII_BMCR << 1),
 			     BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET);
 	} else {
-- 
2.39.2




More information about the barebox mailing list