diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2007-06-11 17:22:52 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:43 -0400 |
commit | 2dd99530a248bc70e712a5f98e0bc66139a582cb (patch) | |
tree | 76b8dfd2e7105b68efa1a98c53543cd6fd959c09 /drivers | |
parent | 7f796d83ffa58c6f752e53dbed8faebb74333e24 (diff) |
r8169: populate the hw_start handler for the 8168
rtl_hw_start_8168 inherits the content of rtl_hw_start_8169 minus
the code which depends on RTL_GIGA_MAC_VER_XY (XY != {11/12}).
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/r8169.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index f549f096dd01..2478ece93bc5 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -156,8 +156,8 @@ enum mac_version { | |||
156 | RTL_GIGA_MAC_VER_03 = 0x02, | 156 | RTL_GIGA_MAC_VER_03 = 0x02, |
157 | RTL_GIGA_MAC_VER_04 = 0x03, | 157 | RTL_GIGA_MAC_VER_04 = 0x03, |
158 | RTL_GIGA_MAC_VER_05 = 0x04, | 158 | RTL_GIGA_MAC_VER_05 = 0x04, |
159 | RTL_GIGA_MAC_VER_11 = 0x0b, | 159 | RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb |
160 | RTL_GIGA_MAC_VER_12 = 0x0c, | 160 | RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be 8168Bf |
161 | RTL_GIGA_MAC_VER_13 = 0x0d, | 161 | RTL_GIGA_MAC_VER_13 = 0x0d, |
162 | RTL_GIGA_MAC_VER_14 = 0x0e, | 162 | RTL_GIGA_MAC_VER_14 = 0x0e, |
163 | RTL_GIGA_MAC_VER_15 = 0x0f | 163 | RTL_GIGA_MAC_VER_15 = 0x0f |
@@ -1969,7 +1969,35 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
1969 | 1969 | ||
1970 | static void rtl_hw_start_8168(struct net_device *dev) | 1970 | static void rtl_hw_start_8168(struct net_device *dev) |
1971 | { | 1971 | { |
1972 | rtl_hw_start_8169(dev); | 1972 | struct rtl8169_private *tp = netdev_priv(dev); |
1973 | void __iomem *ioaddr = tp->mmio_addr; | ||
1974 | |||
1975 | RTL_W8(Cfg9346, Cfg9346_Unlock); | ||
1976 | |||
1977 | RTL_W8(EarlyTxThres, EarlyTxThld); | ||
1978 | |||
1979 | rtl_set_rx_max_size(ioaddr); | ||
1980 | |||
1981 | tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; | ||
1982 | |||
1983 | RTL_W16(CPlusCmd, tp->cp_cmd); | ||
1984 | |||
1985 | RTL_W16(IntrMitigate, 0x0000); | ||
1986 | |||
1987 | rtl_set_rx_tx_desc_registers(tp, ioaddr); | ||
1988 | |||
1989 | RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); | ||
1990 | rtl_set_rx_tx_config_registers(tp); | ||
1991 | |||
1992 | RTL_W8(Cfg9346, Cfg9346_Lock); | ||
1993 | |||
1994 | RTL_R8(IntrMask); | ||
1995 | |||
1996 | RTL_W32(RxMissed, 0); | ||
1997 | |||
1998 | rtl_set_rx_mode(dev); | ||
1999 | |||
2000 | RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000); | ||
1973 | } | 2001 | } |
1974 | 2002 | ||
1975 | static void rtl_hw_start_8101(struct net_device *dev) | 2003 | static void rtl_hw_start_8101(struct net_device *dev) |