]> git.karo-electronics.de Git - linux-beck.git/commitdiff
amd-xgbe: Fix mask appliciation for Clause 37 register
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Mon, 14 Nov 2016 22:39:07 +0000 (16:39 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 03:12:57 +0000 (22:12 -0500)
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

index 0ecae70450445ee61f0cab8b389b8d4144ed62cc..4c5b90eea4af2e389decec1d80b31e7134cee140 100644 (file)
@@ -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: