diff mbox series

[RFC,net-next,13/23] net: mvneta: only allow EEE to be used in "SGMII" modes

Message ID E1tFv49-005yiX-Hw@rmk-PC.armlinux.org.uk (mailing list archive)
State New
Headers show
Series net: phylink managed EEE support | expand

Commit Message

Russell King (Oracle) Nov. 26, 2024, 12:53 p.m. UTC
The Armada 388 manual states that EEE is only supported in "SGMII"
modes. As mvneta only supports serdes modes and RGMII, we can
satisfy this by excluding it for RGMII.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/marvell/mvneta.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 976ce8d6dabf..01bedf0a55f6 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -5551,7 +5551,9 @@  static int mvneta_probe(struct platform_device *pdev)
 	pp->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 |
 		MAC_100 | MAC_1000FD | MAC_2500FD;
 
-	/* Setup EEE.  Choose 250us idle. */
+	/* Setup EEE. Choose 250us idle. Only supported in SGMII modes. */
+	__set_bit(PHY_INTERFACE_MODE_QSGMII, pp->phylink_config.lpi_interfaces);
+	__set_bit(PHY_INTERFACE_MODE_SGMII, pp->phylink_config.lpi_interfaces);
 	pp->phylink_config.lpi_capabilities = MAC_100FD | MAC_1000FD;
 	pp->phylink_config.lpi_timer_limit_us = 255;
 	pp->phylink_config.lpi_timer_default = 250;