[PATCH] net: phy: disable eee due to errata on various KSZ switches

From: Tim Harvey
Date: Fri Oct 04 2024 - 18:08:19 EST


The well-known errata regarding EEE not being functional on various KSZ
switches has been refactored a few times. Recently the refactoring has
excluded several switches that the errata should also apply to.

Disable EEE for these switches based on errata.

Signed-off-by: Tim Harvey <tharvey@xxxxxxxxxxxxx>
---
drivers/net/dsa/microchip/ksz_common.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index b074b4bb0629..d2bd82a1067c 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2578,11 +2578,19 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
if (!port)
return MICREL_KSZ8_P1_ERRATA;
break;
+ case KSZ8795_CHIP_ID:
+ case KSZ8794_CHIP_ID:
+ case KSZ8765_CHIP_ID:
+ /* KSZ87xx DS80000687C Module 2 */
+ case KSZ9896_CHIP_ID:
+ /* KSZ9896 Errata DS80000757A Module 2 */
+ case KSZ9897_CHIP_ID:
+ /* KSZ9897 Errata DS00002394C Module 4 */
+ case KSZ9567_CHIP_ID:
+ /* KSZ9567 Errata DS80000756A Module 4 */
case KSZ9477_CHIP_ID:
- /* KSZ9477 Errata DS80000754C
- *
- * Module 4: Energy Efficient Ethernet (EEE) feature select must
- * be manually disabled
+ /* KSZ9477 Errata DS80000754C Module 4 */
+ /* Energy Efficient Ethernet (EEE) feature select must be manually disabled
* The EEE feature is enabled by default, but it is not fully
* operational. It must be manually disabled through register
* controls. If not disabled, the PHY ports can auto-negotiate
--
2.25.1