lkml.org 
[lkml]   [2011]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [bug?] r8169: hangs under heavy load
booster@wolke7.net <booster@wolke7.net> :
[...]
> Jonathan, I compiled a new kernel with the patch described above but the
> behavior is still the same. During high network load the link hangs:
>
> [ 195.332478] r8169 0000:02:00.0: eth0: link up
> [ 222.517171] r8169 0000:02:00.0: eth0: link up
> [ 222.908277] r8169 0000:02:00.0: eth0: link up
> [ 223.508249] r8169 0000:02:00.0: eth0: link up

It does recover, doesn't it ?

> Is there a way to activate more driver debugging in the kernel ?

You can lower the delay in rtl8169_schedule_work (4) but it is akin
to papering over the issue.

You may try the stuff below in place of the current patch. I will not
be surprized if the link really hangs (no crash but no traffic).

Hayes, does the 8168c require something special to recover from Rx FIFO
overflow ?

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6f06aa1..e937737 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -427,6 +427,7 @@ enum rtl_register_content {
/* InterruptStatusBits */
SYSErr = 0x8000,
PCSTimeout = 0x4000,
+ RxFIFOEmpty = 0x0200,
SWInt = 0x0100,
TxDescUnavail = 0x0080,
RxFIFOOver = 0x0040,
@@ -5815,15 +5816,27 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
}

if (unlikely(status & RxFIFOOver)) {
+ int i;
+
switch (tp->mac_version) {
/* Work around for rx fifo overflow */
case RTL_GIGA_MAC_VER_11:
- case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_26:
netif_stop_queue(dev);
rtl8169_tx_timeout(dev);
goto done;
/* Testers needed. */
+ case RTL_GIGA_MAC_VER_22:
+ for (i = 0; i < 4000000; i++) {
+ if (RTL_R16(IntrStatus) & RxFIFOEmpty) {
+ RTL_W16(IntrStatus, RxFIFOOver);
+ printk(KERN_INFO "FEmp %d\n", i);
+ break;
+ }
+ udelay(10);
+ }
+ if (i >= 4000000)
+ printk(KERN_ERR "no FEmp\n");
case RTL_GIGA_MAC_VER_17:
case RTL_GIGA_MAC_VER_19:
case RTL_GIGA_MAC_VER_20:

\
 
 \ /
  Last update: 2011-11-28 00:21    [W:0.065 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site