From: Lendacky, Thomas Date: Mon, 14 Nov 2016 22:39:07 +0000 (-0600) Subject: amd-xgbe: Fix mask appliciation for Clause 37 register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6fbd47add0d13189bacb1881fe006db5027536e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git amd-xgbe: Fix mask appliciation for Clause 37 register The application of a mask to clear an area of a clause 37 register value was not properly applied. Update the code to do the proper application of the mask. Reported-by: Marion & Christophe JAILLET Signed-off-by: Tom Lendacky Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 0ecae7045044..4c5b90eea4af 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -943,8 +943,8 @@ static void xgbe_an37_init(struct xgbe_prv_data *pdata) /* Set up the Control register */ reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL); - reg &= XGBE_AN_CL37_TX_CONFIG_MASK; - reg &= XGBE_AN_CL37_PCS_MODE_MASK; + reg &= ~XGBE_AN_CL37_TX_CONFIG_MASK; + reg &= ~XGBE_AN_CL37_PCS_MODE_MASK; switch (pdata->an_mode) { case XGBE_AN_MODE_CL37: