From: hayeswang <hayeswang@realtek.com>
To: 'Francois Romieu' <romieu@fr.zoreil.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, 'Ben Hutchings' <benh@debian.org>
Subject: RE: [net-next-2.6 04/08] r8169: 8168DP specific MII registers access methods.
Date: Mon, 3 Jan 2011 20:30:02 +0800 [thread overview]
Message-ID: <2BC582F01DD74ABE849496523D21F085@realtek.com.tw> (raw)
In-Reply-To: <20110102233704.GE5780@electric-eye.fr.zoreil.com>
> From: Francois Romieu [mailto:romieu@fr.zoreil.com]
> Sent: Monday, January 03, 2011 7:37 AM
> To: davem@davemloft.net
> Cc: netdev@vger.kernel.org; Hayeswang; Ben Hutchings
> Subject: [net-next-2.6 04/08] r8169: 8168DP specific MII
> registers access methods.
>
> Adapted from version 8.019.00 of Realtek's r8168 driver.
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Cc: Hayes <hayeswang@realtek.com>
> ---
> drivers/net/r8169.c | 83
> +++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 81 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index
> f9d8ff0..7f6fd12 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -277,6 +277,20 @@ enum rtl8168_8101_registers {
> #define EFUSEAR_DATA_MASK 0xff
> };
>
> +enum rtl8168_registers {
> + EPHY_RXER_NUM = 0x7c,
> + OCPDR = 0xb0, /* OCP GPHY access */
> +#define OCPDR_WRITE_CMD 0x80000000
> +#define OCPDR_READ_CMD 0x00000000
> +#define OCPDR_REG_MASK 0xff
> +#define OCPDR_GPHY_REG_SHIFT 12
The source code of realtek makes a mistake. The value of OCPDR_GPHY_REG_SHIFT
must be 16, not 12. The reg should be at bit 16 ~ 22.
> +#define OCPDR_DATA_MASK 0xffff
> + OCPAR = 0xb4,
> +#define OCPAR_FLAG 0x80000000
> +#define OCPAR_GPHY_WRITE_CMD 0x8000f060
> +#define OCPAR_GPHY_READ_CMD 0x0000f060
> +};
> +
prev parent reply other threads:[~2011-01-03 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-02 23:37 [net-next-2.6 04/08] r8169: 8168DP specific MII registers access methods Francois Romieu
2011-01-03 12:30 ` hayeswang [this message]
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=2BC582F01DD74ABE849496523D21F085@realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=benh@debian.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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