lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 3 Jan 2011 20:30:02 +0800
From:	hayeswang <hayeswang@...ltek.com>
To:	'Francois Romieu' <romieu@...zoreil.com>, <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, 'Ben Hutchings' <benh@...ian.org>
Subject: RE: [net-next-2.6 04/08] r8169: 8168DP specific MII registers access methods.

> From: Francois Romieu [mailto:romieu@...zoreil.com] 
> Sent: Monday, January 03, 2011 7:37 AM
> To: davem@...emloft.net
> Cc: netdev@...r.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@...zoreil.com>
> Cc: Hayes <hayeswang@...ltek.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
> +};
> +

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ