[PATCH net-next v3 2/3] net: pcs: add 2500BASEX support for Intel mGbE controller

Sit, Michael Wei Hong michael.wei.hong.sit at intel.com
Thu May 27 18:57:58 PDT 2021



> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Friday, 28 May, 2021 7:27 AM
> To: Sit, Michael Wei Hong <michael.wei.hong.sit at intel.com>
> Cc: Jose.Abreu at synopsys.com; hkallweit1 at gmail.com;
> linux at armlinux.org.uk; kuba at kernel.org;
> netdev at vger.kernel.org; peppe.cavallaro at st.com;
> alexandre.torgue at foss.st.com; davem at davemloft.net;
> mcoquelin.stm32 at gmail.com; Voon, Weifeng
> <weifeng.voon at intel.com>; Ong, Boon Leong
> <boon.leong.ong at intel.com>; Tan, Tee Min
> <tee.min.tan at intel.com>; vee.khee.wong at linux.intel.com;
> Wong, Vee Khee <vee.khee.wong at intel.com>; linux-stm32 at st-
> md-mailman.stormreply.com; linux-arm-
> kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: Re: [PATCH net-next v3 2/3] net: pcs: add 2500BASEX
> support for Intel mGbE controller
> 
> > +static int xpcs_config_2500basex(struct mdio_xpcs_args *xpcs)
> {
> > +	int ret;
> > +
> > +		ret = xpcs_read(xpcs, MDIO_MMD_VEND2,
> DW_VR_MII_DIG_CTRL1);
> > +		if (ret < 0)
> > +			return ret;
> > +		ret |= DW_VR_MII_DIG_CTRL1_2G5_EN;
> > +		ret &=
> ~DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW;
> > +		ret = xpcs_write(xpcs, MDIO_MMD_VEND2,
> DW_VR_MII_DIG_CTRL1, ret);
> > +		if (ret < 0)
> > +			return ret;
> > +
> > +		ret = xpcs_read(xpcs, MDIO_MMD_VEND2,
> DW_VR_MII_MMD_CTRL);
> > +		if (ret < 0)
> > +			return ret;
> > +		ret &= ~AN_CL37_EN;
> > +		ret |= SGMII_SPEED_SS6;
> > +		ret &= ~SGMII_SPEED_SS13;
> > +		return xpcs_write(xpcs, MDIO_MMD_VEND2,
> DW_VR_MII_MMD_CTRL, ret);
> > +
> > +	return 0;
> 
> Indentation is messed up here? Or a rebase gone wrong
> removing an if statement?
> 
Thanks Andrew! Good catch, missed this indentation error,
will fix in next revision
> 	    Andrew



More information about the linux-arm-kernel mailing list