• Russell King (Oracle)'s avatar
    net: ethernet: mtk_eth_soc: remove incorrect PLL configuration · 76a4cb75
    Russell King (Oracle) authored
    MT7623 GMAC0 attempts to configure the system clocking according to the
    required speed in the .mac_config callback for non-SGMII, non-baseX and
    non-TRGMII modes.
    
    state->speed setting has never been reliable in the .mac_config
    callback - there are cases where this is not the link speed,
    particularly via ethtool paths, so this has always been unreliable (as
    detailed in phylink's documentation.)
    
    There is the additional issue that mtk_gmac0_rgmii_adjust() will only
    be called if state->interface changes, which means it only configures
    the system clocking on the very first .mac_config call, which will be
    made when the network device is first brought up before any link is
    established.
    
    Essentially, this code is incredibly buggy, and probably never worked.
    
    Moreover, checking the in-kernel DT files, it seems no platform makes
    use of this code path.
    
    Therefore, let's remove it, and disable interface modes for port 0 that
    are not SGMII, 1000base-X, 2500base-X or TRGMII on the MT7623.
    Reviewed-by: default avatarDaniel Golle <daniel@makrotopia.org>
    Tested-by: default avatarDaniel Golle <daniel@makrotopia.org>
    Tested-by: default avatarFrank Wunderlich <frank-w@public-files.de>
    Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    76a4cb75
mtk_eth_soc.h 38.8 KB