From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Lendacky Subject: [PATCH 1/2] amd-xgbe: Fix mask appliciation for Clause 37 register Date: Mon, 14 Nov 2016 16:28:49 -0600 Message-ID: <20161114222849.25160.71951.stgit@tlendack-t1.amdoffice.net> References: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: , , David Miller To: Return-path: Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54]:59811 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S941060AbcKNW24 (ORCPT ); Mon, 14 Nov 2016 17:28:56 -0500 In-Reply-To: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 0ecae70..4c5b90e 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: