From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Mikhaylov Subject: [PATCH 2/2] net/ibm/emac: wrong bit is used for STA control register write Date: Mon, 22 Jan 2018 19:00:38 +0300 Message-ID: <20180122160038.18965-2-ivan@de.ibm.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: "David S . Miller" , Christian Lamparter , Rob Herring Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37942 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751170AbeAVQAt (ORCPT ); Mon, 22 Jan 2018 11:00:49 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0MFwq7W065176 for ; Mon, 22 Jan 2018 11:00:48 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fngy5x4n0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 22 Jan 2018 11:00:48 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 22 Jan 2018 16:00:45 -0000 Sender: netdev-owner@vger.kernel.org List-ID: STA control register has areas of mode and opcodes for opeations. 18 bit is using for mode selection, where 0 is old MIO/MDIO access method and 1 is indirect access mode. 19-20 bits are using for setting up read/write operation(STA opcodes). In current state 'read' is set into old MIO/MDIO mode with 19 bit and write operation is set into 18 bit which is mode selection, not a write operation. To correlate write with read we set it into 20 bit. Signed-off-by: Ivan Mikhaylov --- drivers/net/ethernet/ibm/emac/emac.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/emac.h b/drivers/net/ethernet/ibm/emac/emac.h index d0a0e3b..c26d263 100644 --- a/drivers/net/ethernet/ibm/emac/emac.h +++ b/drivers/net/ethernet/ibm/emac/emac.h @@ -244,7 +244,7 @@ struct emac_regs { #define EMAC_STACR_PHYE 0x00004000 #define EMAC_STACR_STAC_MASK 0x00003000 #define EMAC_STACR_STAC_READ 0x00001000 -#define EMAC_STACR_STAC_WRITE 0x00002000 +#define EMAC_STACR_STAC_WRITE 0x00000800 #define EMAC_STACR_OPBC_MASK 0x00000C00 #define EMAC_STACR_OPBC_50 0x00000000 #define EMAC_STACR_OPBC_66 0x00000400 -- 1.7.1