On Wed, 7 Apr 2021 02:10:24 +0200 Andrew Lunn <and...@lunn.ch> wrote:
> > @@ -479,8 +479,8 @@ static int mv3310_config_init(struct phy_device *phydev) > > val = phy_read_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL); > > if (val < 0) > > return val; > > - priv->rate_match = ((val & MV_V2_PORT_CTRL_MACTYPE_MASK) == > > - MV_V2_PORT_CTRL_MACTYPE_RATE_MATCH); > > + priv->rate_match = ((val & MV_V2_33X0_PORT_CTRL_MACTYPE_MASK) == > > + MV_V2_33X0_PORT_CTRL_MACTYPE_RATE_MATCH); > > > > /* Enable EDPD mode - saving 600mW */ > > return mv3310_set_edpd(phydev, ETHTOOL_PHY_EDPD_DFLT_TX_MSECS); > > -- > > So it appears that mv3310_config_init() should not be used with the > mv88x2110. Did i miss somewhere where mv3310_drivers was changed so it > actually does not use it? > > Andrew This patch series makes it later so that mv3310_config_init() correctly initializes even 2210 (this is done in patch 07/18). The function then calls chip->get_mactype() and chip->init_interface() methods, which are different for 3310 than for 2110. I am thinking about whether all the functions which are same for all the chips should be renamed from mv3310_* to mv10g_* This would rename mv3310_config_init to mv10g_config_init which would be more correct. What do you think? Marek