On Mon, 2020-10-19 at 23:00 +0200, Andrew Lunn wrote: > > +static int m88e1111_finisar_config_init(struct phy_device *phydev) > > +{ > > + int err; > > + int extsr = phy_read(phydev, MII_M1111_PHY_EXT_SR); > > + > > + if (extsr < 0) > > + return extsr; > > + > > + /* If using 1000BaseX and 1000BaseX auto-negotiation is > > disabled, enable it */ > > + if (phydev->interface == PHY_INTERFACE_MODE_1000BASEX && > > + (extsr & MII_M1111_HWCFG_MODE_MASK) == > > + MII_M1111_HWCFG_MODE_COPPER_1000BX_NOAN) { > > + err = phy_modify(phydev, MII_M1111_PHY_EXT_SR, > > + MII_M1111_HWCFG_MODE_MASK | > > + MII_M1111_HWCFG_SERIAL_AN_BYPASS, > > + MII_M1111_HWCFG_MODE_COPPER_1000BX_AN > > | > > + MII_M1111_HWCFG_SERIAL_AN_BYPASS); > > + if (err < 0) > > + return err; > > + } > > + > > + return m88e1111_config_init(phydev); > > +} > > Hi Robert > > Is this really specific to the Finisar? It seems like any application > of the m88e1111 in 1000BaseX would benefit from this?
I suppose that part would be pretty harmless, as you would likely want that behavior whenever that if condition was triggered. So m88e1111_finisar_config_init could likely be merged into m88e1111_config_init. Mainly what stopped me from making all of these changes generic to all 88E1111 is that I'm a bit less confident in the different config_aneg behavior, it might be more specific to this SFP copper module case? -- Robert Hancock Senior Hardware Designer, Advanced Technologies www.calian.com