Skip to content

Commit ee76eb2

Browse files
GateworksPaolo Abeni
authored andcommitted
net: dsa: microchip: disable EEE for KSZ879x/KSZ877x/KSZ876x
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 additional switches with this errata and provide additional comments referring to the public errata document. The original workaround for the errata was applied with a register write to manually disable the EEE feature in MMD 7:60 which was being applied for KSZ9477/KSZ9897/KSZ9567 switch ID's. Then came commit 26dd297 ("net: phy: micrel: Move KSZ9477 errata fixes to PHY driver") and commit 6068e6d ("net: dsa: microchip: remove KSZ9477 PHY errata handling") which moved the errata from the switch driver to the PHY driver but only for PHY_ID_KSZ9477 (PHY ID) however that PHY code was dead code because an entry was never added for PHY_ID_KSZ9477 via MODULE_DEVICE_TABLE. This was apparently realized much later and commit 54a4e5c ("net: phy: micrel: add Microchip KSZ 9477 to the device table") added the PHY_ID_KSZ9477 to the PHY driver but as the errata was only being applied to PHY_ID_KSZ9477 it's not completely clear what switches that relates to. Later commit 6149db4 ("net: phy: micrel: fix KSZ9477 PHY issues after suspend/resume") breaks this again for all but KSZ9897 by only applying the errata for that PHY ID. Following that this was affected with commit 08c6d8b("net: phy: Provide Module 4 KSZ9477 errata (DS80000754C)") which removes the blatant register write to MMD 7:60 and replaces it by setting phydev->eee_broken_modes = -1 so that the generic phy-c45 code disables EEE but this is only done for the KSZ9477_CHIP_ID (Switch ID). Lastly commit 0411f73 ("net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897.") adds some additional switches that were missing to the errata due to the previous changes. This commit adds an additional set of switches. Fixes: 0411f73 ("net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897.") Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Oleksij Rempel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 1876479 commit ee76eb2

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,26 +2733,27 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
27332733
return MICREL_KSZ8_P1_ERRATA;
27342734
break;
27352735
case KSZ8567_CHIP_ID:
2736+
/* KSZ8567R Errata DS80000752C Module 4 */
2737+
case KSZ8765_CHIP_ID:
2738+
case KSZ8794_CHIP_ID:
2739+
case KSZ8795_CHIP_ID:
2740+
/* KSZ879x/KSZ877x/KSZ876x Errata DS80000687C Module 2 */
27362741
case KSZ9477_CHIP_ID:
2742+
/* KSZ9477S Errata DS80000754A Module 4 */
27372743
case KSZ9567_CHIP_ID:
2744+
/* KSZ9567S Errata DS80000756A Module 4 */
27382745
case KSZ9896_CHIP_ID:
2746+
/* KSZ9896C Errata DS80000757A Module 3 */
27392747
case KSZ9897_CHIP_ID:
2740-
/* KSZ9477 Errata DS80000754C
2741-
*
2742-
* Module 4: Energy Efficient Ethernet (EEE) feature select must
2743-
* be manually disabled
2748+
/* KSZ9897R Errata DS80000758C Module 4 */
2749+
/* Energy Efficient Ethernet (EEE) feature select must be manually disabled
27442750
* The EEE feature is enabled by default, but it is not fully
27452751
* operational. It must be manually disabled through register
27462752
* controls. If not disabled, the PHY ports can auto-negotiate
27472753
* to enable EEE, and this feature can cause link drops when
27482754
* linked to another device supporting EEE.
27492755
*
2750-
* The same item appears in the errata for the KSZ9567, KSZ9896,
2751-
* and KSZ9897.
2752-
*
2753-
* A similar item appears in the errata for the KSZ8567, but
2754-
* provides an alternative workaround. For now, use the simple
2755-
* workaround of disabling the EEE feature for this device too.
2756+
* The same item appears in the errata for all switches above.
27562757
*/
27572758
return MICREL_NO_EEE;
27582759
}

0 commit comments

Comments
 (0)