* [PATCH] r8169: revert part of 6dccd16b7c2703e8bbf8bca62b5cf248332afbe2
@ 2007-10-03 22:42 Francois Romieu
2007-10-05 18:05 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Francois Romieu @ 2007-10-03 22:42 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, jeti, David Miller
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>
---
drivers/net/r8169.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c921ec3..c76dd29 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1918,7 +1918,11 @@ static void rtl_hw_start_8169(struct net_device *dev)
rtl_set_rx_max_size(ioaddr);
- rtl_set_rx_tx_config_registers(tp);
+ if ((tp->mac_version == RTL_GIGA_MAC_VER_01) ||
+ (tp->mac_version == RTL_GIGA_MAC_VER_02) ||
+ (tp->mac_version == RTL_GIGA_MAC_VER_03) ||
+ (tp->mac_version == RTL_GIGA_MAC_VER_04))
+ rtl_set_rx_tx_config_registers(tp);
tp->cp_cmd |= rtl_rw_cpluscmd(ioaddr) | PCIMulRW;
@@ -1941,6 +1945,14 @@ static void rtl_hw_start_8169(struct net_device *dev)
rtl_set_rx_tx_desc_registers(tp, ioaddr);
+ if ((tp->mac_version != RTL_GIGA_MAC_VER_01) &&
+ (tp->mac_version != RTL_GIGA_MAC_VER_02) &&
+ (tp->mac_version != RTL_GIGA_MAC_VER_03) &&
+ (tp->mac_version != RTL_GIGA_MAC_VER_04)) {
+ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
+ rtl_set_rx_tx_config_registers(tp);
+ }
+
RTL_W8(Cfg9346, Cfg9346_Lock);
/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
@@ -1955,8 +1967,6 @@ static void rtl_hw_start_8169(struct net_device *dev)
/* Enable all known interrupts by setting the interrupt mask. */
RTL_W16(IntrMask, tp->intr_event);
-
- RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
}
static void rtl_hw_start_8168(struct net_device *dev)
--
1.5.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] r8169: revert part of 6dccd16b7c2703e8bbf8bca62b5cf248332afbe2
2007-10-03 22:42 [PATCH] r8169: revert part of 6dccd16b7c2703e8bbf8bca62b5cf248332afbe2 Francois Romieu
@ 2007-10-05 18:05 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-10-05 18:05 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, jeti, David Miller, 許恆嘉
Francois Romieu wrote:
> 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>
I'm applying this, but, please do copy Edward @ RealTek on patches like
this, as a courtesy if nothing else.
Sometimes the kernel development process can be a bit impenetrable for
newcomers, and I'd like to give as much visibility as possible to the
process for the hardware vendor.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-05 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 22:42 [PATCH] r8169: revert part of 6dccd16b7c2703e8bbf8bca62b5cf248332afbe2 Francois Romieu
2007-10-05 18:05 ` Jeff Garzik
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).