Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ethernet: mediatek: Fix MT7629 missing GMII mode support

In the original design, mtk_phy_connect function will set ge_mode=1
if phy-mode is GMII(PHY_INTERFACE_MODE_GMII) and then set the correct
ge_mode to ETHSYS_SYSCFG0 register. This logic was broken after apply
mediatek PHYLINK patch(Fixes tag), the new mtk_mac_config function will
not set ge_mode=1 for GMII mode hence the final ETHSYS_SYSCFG0 setting
will be incorrect for mt7629 GMII mode. This patch add the missing logic
back to fix it.

Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

MarkLee and committed by
David S. Miller
4e3eff5b 8d045995

+1
+1
drivers/net/ethernet/mediatek/mtk_eth_soc.c
··· 261 261 ge_mode = 0; 262 262 switch (state->interface) { 263 263 case PHY_INTERFACE_MODE_MII: 264 + case PHY_INTERFACE_MODE_GMII: 264 265 ge_mode = 1; 265 266 break; 266 267 case PHY_INTERFACE_MODE_REVMII: