Commit 278d65cc authored by Tristram Ha's avatar Tristram Ha Committed by Jakub Kicinski

net: dsa: microchip: fix RGMII error in KSZ DSA driver

The driver should return RMII interface when XMII is running in RMII mode.

Fixes: 0ab7f6bf ("net: dsa: microchip: ksz9477: use common xmii function")
Signed-off-by: default avatarTristram Ha <tristram.ha@microchip.com>
Acked-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Acked-by: default avatarJerry Ray <jerry.ray@microchip.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/1716932066-3342-1-git-send-email-Tristram.Ha@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b8c8abef
...@@ -3142,7 +3142,7 @@ phy_interface_t ksz_get_xmii(struct ksz_device *dev, int port, bool gbit) ...@@ -3142,7 +3142,7 @@ phy_interface_t ksz_get_xmii(struct ksz_device *dev, int port, bool gbit)
else else
interface = PHY_INTERFACE_MODE_MII; interface = PHY_INTERFACE_MODE_MII;
} else if (val == bitval[P_RMII_SEL]) { } else if (val == bitval[P_RMII_SEL]) {
interface = PHY_INTERFACE_MODE_RGMII; interface = PHY_INTERFACE_MODE_RMII;
} else { } else {
interface = PHY_INTERFACE_MODE_RGMII; interface = PHY_INTERFACE_MODE_RGMII;
if (data8 & P_RGMII_ID_EG_ENABLE) if (data8 & P_RGMII_ID_EG_ENABLE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment