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

From: Andrew Lunn
Date: Thu May 27 2021 - 19:27:14 EST


> +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?

Andrew