aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorhayeswang <hayeswang@realtek.com>2013-04-01 18:23:42 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-07 16:44:13 -0400
commit58152cd46f88ea3fb2e518511b8367454b12296a (patch)
tree9fe9ede39ad4e704111c370b3534bc1fdfcbf8a9 /drivers/net/ethernet/realtek
parent1a9646497b163a8b9da5e70008d809dc91b32855 (diff)
r8169: add a new chip for RTL8106E
Add a new chip for RTL8106E series. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 85536bf5e762..e392dd021b19 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -47,6 +47,7 @@
47#define FIRMWARE_8402_1 "rtl_nic/rtl8402-1.fw" 47#define FIRMWARE_8402_1 "rtl_nic/rtl8402-1.fw"
48#define FIRMWARE_8411_1 "rtl_nic/rtl8411-1.fw" 48#define FIRMWARE_8411_1 "rtl_nic/rtl8411-1.fw"
49#define FIRMWARE_8106E_1 "rtl_nic/rtl8106e-1.fw" 49#define FIRMWARE_8106E_1 "rtl_nic/rtl8106e-1.fw"
50#define FIRMWARE_8106E_2 "rtl_nic/rtl8106e-2.fw"
50#define FIRMWARE_8168G_2 "rtl_nic/rtl8168g-2.fw" 51#define FIRMWARE_8168G_2 "rtl_nic/rtl8168g-2.fw"
51#define FIRMWARE_8168G_3 "rtl_nic/rtl8168g-3.fw" 52#define FIRMWARE_8168G_3 "rtl_nic/rtl8168g-3.fw"
52 53
@@ -142,6 +143,7 @@ enum mac_version {
142 RTL_GIGA_MAC_VER_40, 143 RTL_GIGA_MAC_VER_40,
143 RTL_GIGA_MAC_VER_41, 144 RTL_GIGA_MAC_VER_41,
144 RTL_GIGA_MAC_VER_42, 145 RTL_GIGA_MAC_VER_42,
146 RTL_GIGA_MAC_VER_43,
145 RTL_GIGA_MAC_NONE = 0xff, 147 RTL_GIGA_MAC_NONE = 0xff,
146}; 148};
147 149
@@ -271,6 +273,9 @@ static const struct {
271 [RTL_GIGA_MAC_VER_42] = 273 [RTL_GIGA_MAC_VER_42] =
272 _R("RTL8168g/8111g", RTL_TD_1, FIRMWARE_8168G_3, 274 _R("RTL8168g/8111g", RTL_TD_1, FIRMWARE_8168G_3,
273 JUMBO_9K, false), 275 JUMBO_9K, false),
276 [RTL_GIGA_MAC_VER_43] =
277 _R("RTL8106e", RTL_TD_1, FIRMWARE_8106E_2,
278 JUMBO_1K, true),
274}; 279};
275#undef _R 280#undef _R
276 281
@@ -822,6 +827,7 @@ MODULE_FIRMWARE(FIRMWARE_8168F_2);
822MODULE_FIRMWARE(FIRMWARE_8402_1); 827MODULE_FIRMWARE(FIRMWARE_8402_1);
823MODULE_FIRMWARE(FIRMWARE_8411_1); 828MODULE_FIRMWARE(FIRMWARE_8411_1);
824MODULE_FIRMWARE(FIRMWARE_8106E_1); 829MODULE_FIRMWARE(FIRMWARE_8106E_1);
830MODULE_FIRMWARE(FIRMWARE_8106E_2);
825MODULE_FIRMWARE(FIRMWARE_8168G_2); 831MODULE_FIRMWARE(FIRMWARE_8168G_2);
826MODULE_FIRMWARE(FIRMWARE_8168G_3); 832MODULE_FIRMWARE(FIRMWARE_8168G_3);
827 833
@@ -2133,6 +2139,10 @@ static void rtl8169_get_mac_version(struct rtl8169_private *tp,
2133 netif_notice(tp, probe, dev, 2139 netif_notice(tp, probe, dev,
2134 "unknown MAC, using family default\n"); 2140 "unknown MAC, using family default\n");
2135 tp->mac_version = default_version; 2141 tp->mac_version = default_version;
2142 } else if (tp->mac_version == RTL_GIGA_MAC_VER_42) {
2143 tp->mac_version = tp->mii.supports_gmii ?
2144 RTL_GIGA_MAC_VER_42 :
2145 RTL_GIGA_MAC_VER_43;
2136 } 2146 }
2137} 2147}
2138 2148
@@ -3639,6 +3649,7 @@ static void rtl_hw_phy_config(struct net_device *dev)
3639 rtl8168g_1_hw_phy_config(tp); 3649 rtl8168g_1_hw_phy_config(tp);
3640 break; 3650 break;
3641 case RTL_GIGA_MAC_VER_42: 3651 case RTL_GIGA_MAC_VER_42:
3652 case RTL_GIGA_MAC_VER_43:
3642 rtl8168g_2_hw_phy_config(tp); 3653 rtl8168g_2_hw_phy_config(tp);
3643 break; 3654 break;
3644 3655
@@ -3850,6 +3861,7 @@ static void rtl_init_mdio_ops(struct rtl8169_private *tp)
3850 case RTL_GIGA_MAC_VER_40: 3861 case RTL_GIGA_MAC_VER_40:
3851 case RTL_GIGA_MAC_VER_41: 3862 case RTL_GIGA_MAC_VER_41:
3852 case RTL_GIGA_MAC_VER_42: 3863 case RTL_GIGA_MAC_VER_42:
3864 case RTL_GIGA_MAC_VER_43:
3853 ops->write = r8168g_mdio_write; 3865 ops->write = r8168g_mdio_write;
3854 ops->read = r8168g_mdio_read; 3866 ops->read = r8168g_mdio_read;
3855 break; 3867 break;
@@ -3878,6 +3890,7 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)
3878 case RTL_GIGA_MAC_VER_40: 3890 case RTL_GIGA_MAC_VER_40:
3879 case RTL_GIGA_MAC_VER_41: 3891 case RTL_GIGA_MAC_VER_41:
3880 case RTL_GIGA_MAC_VER_42: 3892 case RTL_GIGA_MAC_VER_42:
3893 case RTL_GIGA_MAC_VER_43:
3881 RTL_W32(RxConfig, RTL_R32(RxConfig) | 3894 RTL_W32(RxConfig, RTL_R32(RxConfig) |
3882 AcceptBroadcast | AcceptMulticast | AcceptMyPhys); 3895 AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
3883 break; 3896 break;
@@ -4113,6 +4126,7 @@ static void rtl_init_pll_power_ops(struct rtl8169_private *tp)
4113 case RTL_GIGA_MAC_VER_30: 4126 case RTL_GIGA_MAC_VER_30:
4114 case RTL_GIGA_MAC_VER_37: 4127 case RTL_GIGA_MAC_VER_37:
4115 case RTL_GIGA_MAC_VER_39: 4128 case RTL_GIGA_MAC_VER_39:
4129 case RTL_GIGA_MAC_VER_43:
4116 ops->down = r810x_pll_power_down; 4130 ops->down = r810x_pll_power_down;
4117 ops->up = r810x_pll_power_up; 4131 ops->up = r810x_pll_power_up;
4118 break; 4132 break;
@@ -4186,6 +4200,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
4186 case RTL_GIGA_MAC_VER_40: 4200 case RTL_GIGA_MAC_VER_40:
4187 case RTL_GIGA_MAC_VER_41: 4201 case RTL_GIGA_MAC_VER_41:
4188 case RTL_GIGA_MAC_VER_42: 4202 case RTL_GIGA_MAC_VER_42:
4203 case RTL_GIGA_MAC_VER_43:
4189 RTL_W32(RxConfig, RX128_INT_EN | RX_DMA_BURST | RX_EARLY_OFF); 4204 RTL_W32(RxConfig, RX128_INT_EN | RX_DMA_BURST | RX_EARLY_OFF);
4190 break; 4205 break;
4191 default: 4206 default:
@@ -4345,6 +4360,7 @@ static void rtl_init_jumbo_ops(struct rtl8169_private *tp)
4345 case RTL_GIGA_MAC_VER_40: 4360 case RTL_GIGA_MAC_VER_40:
4346 case RTL_GIGA_MAC_VER_41: 4361 case RTL_GIGA_MAC_VER_41:
4347 case RTL_GIGA_MAC_VER_42: 4362 case RTL_GIGA_MAC_VER_42:
4363 case RTL_GIGA_MAC_VER_43:
4348 default: 4364 default:
4349 ops->disable = NULL; 4365 ops->disable = NULL;
4350 ops->enable = NULL; 4366 ops->enable = NULL;
@@ -4453,6 +4469,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
4453 tp->mac_version == RTL_GIGA_MAC_VER_40 || 4469 tp->mac_version == RTL_GIGA_MAC_VER_40 ||
4454 tp->mac_version == RTL_GIGA_MAC_VER_41 || 4470 tp->mac_version == RTL_GIGA_MAC_VER_41 ||
4455 tp->mac_version == RTL_GIGA_MAC_VER_42 || 4471 tp->mac_version == RTL_GIGA_MAC_VER_42 ||
4472 tp->mac_version == RTL_GIGA_MAC_VER_43 ||
4456 tp->mac_version == RTL_GIGA_MAC_VER_38) { 4473 tp->mac_version == RTL_GIGA_MAC_VER_38) {
4457 RTL_W8(ChipCmd, RTL_R8(ChipCmd) | StopReq); 4474 RTL_W8(ChipCmd, RTL_R8(ChipCmd) | StopReq);
4458 rtl_udelay_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666); 4475 rtl_udelay_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666);
@@ -5527,6 +5544,9 @@ static void rtl_hw_start_8101(struct net_device *dev)
5527 case RTL_GIGA_MAC_VER_39: 5544 case RTL_GIGA_MAC_VER_39:
5528 rtl_hw_start_8106(tp); 5545 rtl_hw_start_8106(tp);
5529 break; 5546 break;
5547 case RTL_GIGA_MAC_VER_43:
5548 rtl_hw_start_8168g_2(tp);
5549 break;
5530 } 5550 }
5531 5551
5532 RTL_W8(Cfg9346, Cfg9346_Lock); 5552 RTL_W8(Cfg9346, Cfg9346_Lock);
@@ -6811,6 +6831,7 @@ static void rtl_hw_initialize(struct rtl8169_private *tp)
6811 case RTL_GIGA_MAC_VER_40: 6831 case RTL_GIGA_MAC_VER_40:
6812 case RTL_GIGA_MAC_VER_41: 6832 case RTL_GIGA_MAC_VER_41:
6813 case RTL_GIGA_MAC_VER_42: 6833 case RTL_GIGA_MAC_VER_42:
6834 case RTL_GIGA_MAC_VER_43:
6814 rtl_hw_init_8168g(tp); 6835 rtl_hw_init_8168g(tp);
6815 break; 6836 break;
6816 6837