netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: netdev@vger.kernel.org
Cc: jeff@garzik.org, akpm@linux-foundation.org,
	Edward Hsu <edward_hsu@realtek.com.tw>,
	Mario Limonciello <mario_limonciello@dell.com>,
	Kasper Sandberg <lkml@metanurb.dk>
Subject: [PATCH 4/13] r8169: new phy init parameters for the 8168b
Date: Sun, 29 Jun 2008 16:42:21 +0200	[thread overview]
Message-ID: <20080629144221.GE1540@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20080629143817.GA1540@electric-eye.fr.zoreil.com>

The new parameters are synced with Realtek's driver
version 8.006.00.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
---
 drivers/net/r8169.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a42a21f..d3c9db5 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1233,6 +1233,30 @@ static void rtl8169sb_hw_phy_config(void __iomem *ioaddr)
 	rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
 }
 
+static void rtl8168bb_hw_phy_config(void __iomem *ioaddr)
+{
+	struct phy_reg phy_reg_init[] = {
+		{ 0x10, 0xf41b },
+		{ 0x1f, 0x0000 }
+	};
+
+	mdio_write(ioaddr, 0x1f, 0x0001);
+	mdio_patch(ioaddr, 0x16, 1 << 0);
+
+	rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
+}
+
+static void rtl8168bef_hw_phy_config(void __iomem *ioaddr)
+{
+	struct phy_reg phy_reg_init[] = {
+		{ 0x1f, 0x0001 },
+		{ 0x10, 0xf41b },
+		{ 0x1f, 0x0000 }
+	};
+
+	rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
+}
+
 static void rtl8168cp_hw_phy_config(void __iomem *ioaddr)
 {
 	struct phy_reg phy_reg_init[] = {
@@ -1320,6 +1344,15 @@ static void rtl_hw_phy_config(struct net_device *dev)
 	case RTL_GIGA_MAC_VER_04:
 		rtl8169sb_hw_phy_config(ioaddr);
 		break;
+	case RTL_GIGA_MAC_VER_11:
+		rtl8168bb_hw_phy_config(ioaddr);
+		break;
+	case RTL_GIGA_MAC_VER_12:
+		rtl8168bef_hw_phy_config(ioaddr);
+		break;
+	case RTL_GIGA_MAC_VER_17:
+		rtl8168bef_hw_phy_config(ioaddr);
+		break;
 	case RTL_GIGA_MAC_VER_18:
 		rtl8168cp_hw_phy_config(ioaddr);
 		break;
-- 
1.5.3.3


  parent reply	other threads:[~2008-06-29 14:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 14:38 [RFT 0/13] r8169 branch info Francois Romieu
2008-06-29 14:39 ` [PATCH 1/13] r8169: multicast register update (sync with Realtek's 8.004.00 8168 driver) Francois Romieu
2008-06-29 14:40 ` [PATCH 2/13] r8169: remove non-napi code Francois Romieu
2008-06-29 14:41 ` [PATCH 3/13] r8169: update phy init parameters Francois Romieu
2008-06-29 14:42 ` Francois Romieu [this message]
2008-06-29 14:43 ` [PATCH 5/13] r8169: shuffle some registers handling around (8168 operation only) Francois Romieu
2008-06-29 14:44 ` [PATCH 6/13] r8169: add 8168 registers description Francois Romieu
2008-06-29 14:44 ` [PATCH 7/13] r8169: make room for more specific 8168 hardware start procedure Francois Romieu
2008-06-29 14:45 ` [PATCH 8/13] r8169: Tx performance tweak Francois Romieu
2008-06-30 10:53   ` Ben Hutchings
2008-07-01 21:40     ` Francois Romieu
2008-06-29 14:46 ` [PATCH 9/13] r8169: sync existing 8168 device hardware start sequences with vendor driver Francois Romieu
2008-06-29 14:47 ` [PATCH 10/13] r8169: add a new 8168 flavor Francois Romieu
2008-06-29 14:47 ` [PATCH 11/13] r8169: add a new 8168 flavor (bis) Francois Romieu
2008-06-29 14:48 ` [PATCH 12/13] r8169: add a new 8168 flavor (ter) Francois Romieu
2008-06-29 14:49 ` [PATCH 13/13] r8169: change default behavior for mildly identified 8168c chipsets Francois Romieu

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=20080629144221.GE1540@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=akpm@linux-foundation.org \
    --cc=edward_hsu@realtek.com.tw \
    --cc=jeff@garzik.org \
    --cc=lkml@metanurb.dk \
    --cc=mario_limonciello@dell.com \
    --cc=netdev@vger.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).