diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2007-06-11 17:29:50 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:43 -0400 |
commit | cdf1a608a6ccf9cf1a773969395b58b017bd6f75 (patch) | |
tree | b6ad424d37aad744e4fbe01dc8cbda97617de530 /drivers/net/r8169.c | |
parent | 2dd99530a248bc70e712a5f98e0bc66139a582cb (diff) |
r8169: populate the hw_start handler for the 8110
Same thing as the previous change for rtl_hw_start_8168.
The 8101 related code in rtl_hw_start_8169 (see RTL_GIGA_MAC_VER_13)
goes away.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 2478ece93bc5..56b9040b3d55 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -158,9 +158,9 @@ enum mac_version { | |||
158 | RTL_GIGA_MAC_VER_05 = 0x04, | 158 | RTL_GIGA_MAC_VER_05 = 0x04, |
159 | RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb | 159 | RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb |
160 | RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be 8168Bf | 160 | RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be 8168Bf |
161 | RTL_GIGA_MAC_VER_13 = 0x0d, | 161 | RTL_GIGA_MAC_VER_13 = 0x0d, // 8101Eb 8101Ec |
162 | RTL_GIGA_MAC_VER_14 = 0x0e, | 162 | RTL_GIGA_MAC_VER_14 = 0x0e, // 8101 |
163 | RTL_GIGA_MAC_VER_15 = 0x0f | 163 | RTL_GIGA_MAC_VER_15 = 0x0f // 8101 |
164 | }; | 164 | }; |
165 | 165 | ||
166 | enum phy_version { | 166 | enum phy_version { |
@@ -1892,11 +1892,6 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
1892 | pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x08); | 1892 | pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x08); |
1893 | } | 1893 | } |
1894 | 1894 | ||
1895 | if (tp->mac_version == RTL_GIGA_MAC_VER_13) { | ||
1896 | pci_write_config_word(pdev, 0x68, 0x00); | ||
1897 | pci_write_config_word(pdev, 0x69, 0x08); | ||
1898 | } | ||
1899 | |||
1900 | /* Undocumented stuff. */ | 1895 | /* Undocumented stuff. */ |
1901 | if (tp->mac_version == RTL_GIGA_MAC_VER_05) { | 1896 | if (tp->mac_version == RTL_GIGA_MAC_VER_05) { |
1902 | /* Realtek's r1000_n.c driver uses '&& 0x01' here. Well... */ | 1897 | /* Realtek's r1000_n.c driver uses '&& 0x01' here. Well... */ |
@@ -2002,7 +1997,41 @@ static void rtl_hw_start_8168(struct net_device *dev) | |||
2002 | 1997 | ||
2003 | static void rtl_hw_start_8101(struct net_device *dev) | 1998 | static void rtl_hw_start_8101(struct net_device *dev) |
2004 | { | 1999 | { |
2005 | rtl_hw_start_8169(dev); | 2000 | struct rtl8169_private *tp = netdev_priv(dev); |
2001 | void __iomem *ioaddr = tp->mmio_addr; | ||
2002 | struct pci_dev *pdev = tp->pci_dev; | ||
2003 | |||
2004 | if (tp->mac_version == RTL_GIGA_MAC_VER_13) { | ||
2005 | pci_write_config_word(pdev, 0x68, 0x00); | ||
2006 | pci_write_config_word(pdev, 0x69, 0x08); | ||
2007 | } | ||
2008 | |||
2009 | RTL_W8(Cfg9346, Cfg9346_Unlock); | ||
2010 | |||
2011 | RTL_W8(EarlyTxThres, EarlyTxThld); | ||
2012 | |||
2013 | rtl_set_rx_max_size(ioaddr); | ||
2014 | |||
2015 | tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; | ||
2016 | |||
2017 | RTL_W16(CPlusCmd, tp->cp_cmd); | ||
2018 | |||
2019 | RTL_W16(IntrMitigate, 0x0000); | ||
2020 | |||
2021 | rtl_set_rx_tx_desc_registers(tp, ioaddr); | ||
2022 | |||
2023 | RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); | ||
2024 | rtl_set_rx_tx_config_registers(tp); | ||
2025 | |||
2026 | RTL_W8(Cfg9346, Cfg9346_Lock); | ||
2027 | |||
2028 | RTL_R8(IntrMask); | ||
2029 | |||
2030 | RTL_W32(RxMissed, 0); | ||
2031 | |||
2032 | rtl_set_rx_mode(dev); | ||
2033 | |||
2034 | RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xf000); | ||
2006 | } | 2035 | } |
2007 | 2036 | ||
2008 | static int rtl8169_change_mtu(struct net_device *dev, int new_mtu) | 2037 | static int rtl8169_change_mtu(struct net_device *dev, int new_mtu) |