Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

r8169: revert part of 6dccd16b7c2703e8bbf8bca62b5cf248332afbe2

The 8169/8110SC currently announces itself as:
[...]
eth0: RTL8169sc/8110sc at 0x........, ..:..:..:..:..:.., XID 18000000 IRQ ..
^^^^^^^^
It uses RTL_GIGA_MAC_VER_05 and this part of the changeset can cut
its performance by a factor of 2~2.5 as reported by Timo.

(the driver includes code just before the hunk to write the ChipCmd
register when mac_version == RTL_GIGA_MAC_VER_0[1-4])

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Timo Jantunen <jeti@welho.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by

Francois Romieu and committed by
Jeff Garzik
c946b304 af299901

+13 -3
+13 -3
drivers/net/r8169.c
··· 1918 1918 1919 1919 rtl_set_rx_max_size(ioaddr); 1920 1920 1921 - rtl_set_rx_tx_config_registers(tp); 1921 + if ((tp->mac_version == RTL_GIGA_MAC_VER_01) || 1922 + (tp->mac_version == RTL_GIGA_MAC_VER_02) || 1923 + (tp->mac_version == RTL_GIGA_MAC_VER_03) || 1924 + (tp->mac_version == RTL_GIGA_MAC_VER_04)) 1925 + rtl_set_rx_tx_config_registers(tp); 1922 1926 1923 1927 tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW; 1924 1928 ··· 1945 1941 1946 1942 rtl_set_rx_tx_desc_registers(tp, ioaddr); 1947 1943 1944 + if ((tp->mac_version != RTL_GIGA_MAC_VER_01) && 1945 + (tp->mac_version != RTL_GIGA_MAC_VER_02) && 1946 + (tp->mac_version != RTL_GIGA_MAC_VER_03) && 1947 + (tp->mac_version != RTL_GIGA_MAC_VER_04)) { 1948 + RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); 1949 + rtl_set_rx_tx_config_registers(tp); 1950 + } 1951 + 1948 1952 RTL_W8(Cfg9346, Cfg9346_Lock); 1949 1953 1950 1954 /* Initially a 10 us delay. Turned it into a PCI commit. - FR */ ··· 1967 1955 1968 1956 /* Enable all known interrupts by setting the interrupt mask. */ 1969 1957 RTL_W16(IntrMask, tp->intr_event); 1970 - 1971 - RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); 1972 1958 } 1973 1959 1974 1960 static void rtl_hw_start_8168(struct net_device *dev)