]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ethernet: mediatek: Fix MT7629 missing GMII mode support
authorMarkLee <Mark-MC.Lee@mediatek.com>
Mon, 14 Oct 2019 07:15:17 +0000 (15:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Oct 2019 01:03:35 +0000 (18:03 -0700)
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: fcc7dd9fe410 ("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>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index c61069340f4f23a26b825ab2a304e69fdbaddbba..703adb96429e24abe453e681f6f815ba1fb526de 100644 (file)
@@ -261,6 +261,7 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode,
                ge_mode = 0;
                switch (state->interface) {
                case PHY_INTERFACE_MODE_MII:
+               case PHY_INTERFACE_MODE_GMII:
                        ge_mode = 1;
                        break;
                case PHY_INTERFACE_MODE_REVMII: