From: Christian Lamparter <chunkeey@gmail.com>
To: Ivan Mikhaylov <ivan@de.ibm.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Rob Herring <robh@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] net/ibm/emac: wrong bit is used for STA control register write
Date: Mon, 22 Jan 2018 17:22:30 +0100 [thread overview]
Message-ID: <2818110.k5nooOEKBD@debian64> (raw)
In-Reply-To: <20180122160038.18965-2-ivan@de.ibm.com>
On Monday, January 22, 2018 5:00:38 PM CET Ivan Mikhaylov wrote:
> 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 <ivan@de.ibm.com>
> ---
> 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
>
Something looks wrong here?! The commit message talks about bit 18, 19 and 20.
However, 0x0800, 0x1000, 0x2000 and are like bit 11, 12 and 13? Furthermore,
what about the EMAC_STACR_STAC_MASK? shouldn't it be 0x1800 now (or delete it
since it doesn't look like it's used anywhere?).
next prev parent reply other threads:[~2018-01-22 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 16:00 [PATCH 2/2] net/ibm/emac: wrong bit is used for STA control register write Ivan Mikhaylov
2018-01-22 16:22 ` Christian Lamparter [this message]
2018-01-22 19:01 ` Ivan Mikhaylov
2018-01-22 20:29 ` Christian Lamparter
2018-01-23 16:44 ` Ivan Mikhaylov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2818110.k5nooOEKBD@debian64 \
--to=chunkeey@gmail.com \
--cc=davem@davemloft.net \
--cc=ivan@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).