I recently bought a new motherboard with Realtek 8111C nics. The nic
is detected as:dmesg:
r8169 Gigabit Ethernet driver 2.2LK-NAPI loaded
ACPI: PCI Interrupt 0000:06:00.0[A] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:06:00.0 to 64
eth0: RTL8168c/8111c at 0xffffc2000063e000, 00:1f:d0:20:01:57, XID
3c4000c0 IRQ 2292lspci -v:
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
Subsystem: Giga-byte Technology Unknown device e000
Flags: bus master, fast devsel, latency 0, IRQ 2292
I/O ports at b000 [size=256]
Memory at de010000 (64-bit, prefetchable) [size=4K]
Memory at de000000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at de020000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+
Queue=0/1 Enable+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2
Capabilities: [d0] Vital Product Data <?>
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [140] Virtual Channel <?>
Capabilities: [160] Device Serial Number 78-56-34-12-78-56-34-12
Kernel driver in use: r8169
Kernel modules: r8169I have been having two problems with this nic:
1) On a cold boot, the nic is not brought up correctly. It seems to
stay at 100mbit instead of going into gbit mode, and it fails to ping
the router even though it seems to get a valid IP address. If I then
warm boot the computer, then then nic comes up in gbit just fine, and
generally works.2) I am getting a lot of timeouts:
Aug 4 17:49:35 saphire kernel: NETDEV WATCHDOG: eth0: transmit timed out
Aug 4 17:49:35 saphire kernel: r8169: eth0: link up
Aug 4 17:50:05 saphire kernel: NETDEV WATCHDOG: eth0: transmit timed out
Aug 4 17:50:05 saph...
I probably should have mentioned that I am running the 2.6.26 kernel.
John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
I just tried applying ALL the patches found here:
http://userweb.kernel.org/~romieu/r8169/2.6.27-rc1/20080803.tar.bz2
against 2.6.26.1. Worked for a while, I then I got:
Aug 4 21:23:24 saphire kernel: NETDEV WATCHDOG: eth0: transmit timed out
Aug 4 21:23:24 saphire kernel: ------------[ cut here ]------------
Aug 4 21:23:24 saphire kernel: WARNING: at
net/sched/sch_generic.c:222 dev_watchdog+0xb6/0x116()
Aug 4 21:23:24 saphire kernel: Modules linked in: hdpvr videodev
v4l1_compat v4l2_common nfs nfsd lockd nfs_acl auth_rpcgss exportfs
autofs4 coretemp hwmon fuse sunrpc ipv6 acpi_cpufreq xfs dm_mirror
dm_log dm_multipath dm_mod raid456 async_xor async_memcpy async_tx xor
snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
sr_mod snd_seq_device i2c_i801 serio_raw i2c_core snd_pcm_oss pcspkr
cdrom snd_mixer_oss snd_pcm snd_timer snd_page_alloc r8169 snd_hwdep
snd mii pl2303 usbserial soundcore sg button sata_mv sata_sil24 ahci
libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd
[last unloaded: microcode]
Aug 4 21:23:24 saphire kernel: Pid: 12472, comm: cc1plus Not tainted
2.6.26.1 #1
Aug 4 21:23:24 saphire kernel:
Aug 4 21:23:24 saphire kernel: Call Trace:
Aug 4 21:23:24 saphire kernel: <IRQ> [<ffffffff81031fa8>]
warn_on_slowpath+0x58/0x86
Aug 4 21:23:24 saphire kernel: [<ffffffff8103a78e>] ? __mod_timer+0xc1/0xd3
Aug 4 21:23:24 saphire kernel: [<ffffffff81041458>] ?
queue_delayed_work_on+0xc3/0xd6
Aug 4 21:23:24 saphire kernel: [<ffffffff81216891>] ? dev_watchdog+0x0/0x116
Aug 4 21:23:24 saphire kernel: [<ffffffff810414a7>] ?
queue_delayed_work+0x21/0x23
Aug 4 21:23:24 saphire kernel: [<ffffffff810414c2>] ?
schedule_delayed_work+0x19/0x1b
Aug 4 21:23:24 saphire kernel: [<ffffffff81216947>] dev_watchdog+0xb6/0x116
Aug 4 21:23:24 saphire kernel: [<ffffffff8103a230>]
run_timer_softirq+0x16c/0x1e1
Aug 4 21:23:24 saphire kernel: [<ffffffff81036a93>] __do_softirq+0...
(please Cc: the maintainer)
John P Poet <jppoet@gmail.com> :
Try to add 0002-r8169-avoid-thrashing-PCI-conf-space-above-RTL_GIGA.patch
from http://userweb.kernel.org/~romieu/r8169/2.6.26/20080717/It is in 2.6.27-rc1 as 77332894c21165404496c56763d7df6c15c4bb09.
--
Ueimor
--
Thank you for the response. That DOES seem to fix the cold-boot issue.
Unfortunately, it does not fix the timeout problem. I am still
experiencing transmittion problems:===================================================================
Aug 5 22:42:31 saphire kernel: NETDEV WATCHDOG: eth0: transmit timed out
Aug 5 22:42:31 saphire kernel: ------------[ cut here ]------------
Aug 5 22:42:31 saphire kernel: WARNING: at
net/sched/sch_generic.c:222 dev_watchdog+0xb6/0x116()
Aug 5 22:42:31 saphire kernel: Modules linked in: hdpvr videodev
v4l1_compat v4l2_common nfs nfsd lockd nfs_acl auth_rpcgss exportfs
autofs4 coretemp hwmon fuse sunrpc ipv6 acpi_cpufreq xfs dm_mirror
dm_log dm_multipath dm_mod raid456 async_xor async_memcpy async_tx xor
snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event i2c_i801
snd_seq serio_raw pcspkr sr_mod i2c_core cdrom snd_seq_device
snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_hwdep
r8169 snd pl2303 usbserial soundcore sg button sata_mv sata_sil24 ahci
libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd
[last unloaded: microcode]
Aug 5 22:42:31 saphire kernel: Pid: 0, comm: swapper Not tainted 2.6.26.1b #1
Aug 5 22:42:31 saphire kernel:
Aug 5 22:42:31 saphire kernel: Call Trace:
Aug 5 22:42:31 saphire kernel: <IRQ> [<ffffffff81031fa8>]
warn_on_slowpath+0x58/0x86
Aug 5 22:42:31 saphire kernel: [<ffffffff8103a78e>] ? __mod_timer+0xc1/0xd3
Aug 5 22:42:31 saphire kernel: [<ffffffff81041458>] ?
queue_delayed_work_on+0xc3/0xd6
Aug 5 22:42:31 saphire kernel: [<ffffffff81216891>] ? dev_watchdog+0x0/0x116
Aug 5 22:42:31 saphire kernel: [<ffffffff810414a7>] ?
queue_delayed_work+0x21/0x23
Aug 5 22:42:31 saphire kernel: [<ffffffff810414c2>] ?
schedule_delayed_work+0x19/0x1b
Aug 5 22:42:31 saphire kernel: [<ffffffff81216947>] dev_watchdog+0xb6/0x116
Aug 5 22:42:31 saphire kernel: [<ffffffff8103a230>]
run_timer_softirq+0x16c/0x1e1
Aug 5 22:42:3...
John P Poet <jppoet@gmail.com> :
Does the patch below (on top of the current pile) make a difference ?
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c421bf6..348846f 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -874,12 +874,9 @@ static int rtl8169_set_speed_xmii(struct net_device *dev,auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
- if ((tp->mac_version == RTL_GIGA_MAC_VER_12) ||
- (tp->mac_version == RTL_GIGA_MAC_VER_17)) {
- /* Vendor specific (0x1f) and reserved (0x0e) MII registers. */
- mdio_write(ioaddr, 0x1f, 0x0000);
- mdio_write(ioaddr, 0x0e, 0x0000);
- }
+ /* Vendor specific (0x1f) and reserved (0x0e) MII registers. */
+ mdio_write(ioaddr, 0x1f, 0x0000);
+ mdio_write(ioaddr, 0x0e, 0x0000);tp->phy_auto_nego_reg = auto_nego;
tp->phy_1000_ctrl_reg = giga_ctrl;
--
Ueimor
--
That does not make any difference.
I will say, that the problem seems to be reduced by this patch (or the
0002-r8169-avoid-thrashing-PCI-conf-space-above-RTL_GIGA.patch).Before, I was getting failures two or three times an hour. With
either of these patches applied, the failure rate has dropped to one
every two to four hours.Thanks for trying.
John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
John P Poet <jppoet@gmail.com> :
I have updated the kit at http://userweb.kernel.org/~romieu/r8169/2.6.27-rc2
Can you give it a try ?
--
Ueimor
--
At first I *just* applied 20080807-r8169-test.patch, but the NIC did
not initialize during boot. So, I also applied
0002-r8169-avoid-thrashing-PCI-conf-space-above-RTL_GIGA.patch. After
that, it booted okay.However, in general use it is much worse. May just be bad luck (or
something in the 2.26.2 kernel?), but the timeout message are rampant:Aug 7 21:14:58 saphire kernel: NETDEV WATCHDOG: eth0: transmit timed out
Aug 7 21:14:58 saphire kernel: r8169: eth0: link upJohn
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
Any other ideas on this problem? I am wondering if most people are
not complaining about it, because it is probably not noticeable for
web browsing (web browsing naturally has latencies involved). It is a
killer for streaming stuff in "real time" between two machines,
though.On my current machine with a 8111C NIC, I have disabled that NIC and
bought an Intel e1000 PCIe NIC. That has solved the problem on that
computer, but I want to build another computer, and it seems like all
the new motherboards have the Realtek 8111C on them.Should I try the "official" driver from Realtek? How hard is it to integrate?
Thanks,
John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
John P Poet <jppoet@gmail.com> :
Yes, it would be interesting to know if it performs better.
Could you send the output of 'mii-tool -vv' ? I am curious to know how
It is supposed to build as an external module.
--
Ueimor
--
Hmmm. Not just "much worse", but much, much, much, much, much worse!
I am getting several timeouts every minute.John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
I also have a Realtek GigE card that was quite stable running on
2.6.24. I recently updated my kernel briefly to 2.6.25.10 then
ultimately to 2.6.26.2 and started seeing similar timeouts in both
kernel versions. My configuration didn't change much between the
kernels, but I do remember enabling MSI when I rebuit the kernel. I
have not yet had a chance to disable MSI to see if that fixes the
timeouts but I thought I'd post what info I have in case that might
steer the debug in the right direction. The frequency of the timeouts
has been quite low, and once the interface comes back up everything
seems to continue to function properly. I haven't applied any of the
discussed patches yet, but I have set up the machine to disable MSI
the next time I am able to reboot it. Prior to the kernel update from
2.6.24, MSI was diabled and I did not have any issues with timeouts on
the interface. Let me know if I can provide any more information that
may help with this debug.Here is the initialization:
Aug 6 17:02:13 [kernel] r8169 Gigabit Ethernet driver 2.2LK-NAPI loaded
Aug 6 17:02:13 [kernel] ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 16
(level, low) -> IRQ 16
Aug 6 17:02:13 [kernel] PCI: Setting latency timer of device 0000:04:00.0 to 64
Aug 6 17:02:13 [kernel] eth0: RTL8168b/8111b at 0xf881e000,
00:1a:4d:53:cd:0f, XID 38000000 IRQ 218Several days later the first timeout:
NETDEV WATCHDOG: eth0: transmit timed out
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:222 dev_watchdog+0xfd/0x110()
Modules linked in: xfs nfs coretemp it87 hwmon_vid eeprom nfsd lockd
sunrpc exportfs snd_pcm_oss snd_mixer_oss snd_seq_oss
snd_seq_midi_event snd_seq snd_seq_device fuse raid0 raid456 async_xor
async_memcpy async_tx xor md_mod raw1394 or51132 usbhid cx88_dvb
cx88_vp3054_i2c videobuf_dvb dvb_core tuner_simple tuner_types tda9887
tda8290 tuner tvaudio nvidia(P) msp3400 cx8800 cx88_alsa cx8802 cx88xx
bttv firmware_class compat_ioctl32 videodev v4l1_compat ir...
David Madsen <david.madsen@gmail.com> :
Please note that the kernel complains more loudly about the watchdog
than it used to. Does it allow traffic to flow afterwards ?--
Ueimor
--
Likewise for me, the connection does come back up and continues to
function. Prior to the upgrade and switch to MSI though I never had
any glitches like these that are occurring now. Hopefully I'll be
able to disable MSI sometime this week to test out that theory. Since
these timeouts are not easily forced (seems to be unaffected by
traffic load) It may take a while to confirm whether that fixes the
problem or not.--David Madsen
--
When one of these "hick-ups" happen while I am streaming video from my Myth
backend to my Myth frontend, it kills the playback, and I have to re-start
it. It takes 5 to 10 seconds before I can re-start the playback, but it does
work without having to take any special action on my part.So, to answer your question, yes traffic does flow afterwards.
John
--
*Instead* of the previous patches, right?
I will try applying 20080807-r8169-test.patch to the new 2.6.26.2 source.
Thanks,
John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--
| Rafael J. Wysocki | [Bug #10493] mips BCM47XX compile error |
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andrea Arcangeli | [PATCH 00 of 11] mmu notifier #v16 |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Mark Lord | Re: [BUG] New Kernel Bugs |
