Re: 2.6.3 - 8139too timeout debug info

From: OGAWA Hirofumi
Date: Sun Feb 29 2004 - 07:39:50 EST


"Nick Warne" <nick@xxxxxxxxx> writes:

> OK, I have patched as asked, and still get the problem.
>
> Information here, 2 new files:
>
> http://www.linicks.net/8139too_debug/
>
> debug_with_patch01.txt
>
> &
>
> debug_with_patch01_patch02.txt

Thanks. Umm.. strange, already NAPI reverted.
Does these patches change the behavior?


debug + revert01 + revert02 + revert03

after

debug + revert01 + revert02 + revert03 + revert04

--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>

---

drivers/net/8139too.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)

diff -puN drivers/net/8139too.c~8139too-revert03 drivers/net/8139too.c
--- linux-2.6.4-rc1/drivers/net/8139too.c~8139too-revert03 2004-02-29 20:35:21.000000000 +0900
+++ linux-2.6.4-rc1-hirofumi/drivers/net/8139too.c 2004-02-29 21:29:49.000000000 +0900
@@ -1374,7 +1374,7 @@ static int rtl8139_open (struct net_devi

rtl8139_start_thread(dev);

- printk("%s: revert02\n", dev->name);
+ printk("%s: revert03\n", dev->name);
spin_lock_irq(&tp->lock);
RTL8139_DUMP(dev);
spin_unlock_irq(&tp->lock);
@@ -2172,8 +2172,11 @@ static irqreturn_t rtl8139_interrupt (in
u16 status, ackstat;
int link_changed = 0; /* avoid bogus "uninit" warning */
int handled = 0;
+ int boguscnt = 20;

spin_lock (&tp->lock);
+ do {
+
status = RTL_R16 (IntrStatus);

/* shared irq? */
@@ -2216,6 +2219,9 @@ static irqreturn_t rtl8139_interrupt (in
if (status & TxErr)
RTL_W16 (IntrStatus, TxErr);
}
+
+ boguscnt--;
+ } while(boguscnt > 0);
out:
spin_unlock (&tp->lock);


_
---

drivers/net/8139too.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)

diff -puN drivers/net/8139too.c~8139too-revert04 drivers/net/8139too.c
--- linux-2.6.4-rc1/drivers/net/8139too.c~8139too-revert04 2004-02-29 21:30:19.000000000 +0900
+++ linux-2.6.4-rc1-hirofumi/drivers/net/8139too.c 2004-02-29 21:31:05.000000000 +0900
@@ -1374,7 +1374,7 @@ static int rtl8139_open (struct net_devi

rtl8139_start_thread(dev);

- printk("%s: revert03\n", dev->name);
+ printk("%s: revert04\n", dev->name);
spin_lock_irq(&tp->lock);
RTL8139_DUMP(dev);
spin_unlock_irq(&tp->lock);
@@ -2225,6 +2225,14 @@ static irqreturn_t rtl8139_interrupt (in
out:
spin_unlock (&tp->lock);

+ if (boguscnt <= 0) {
+ printk (KERN_WARNING "%s: Too much work at interrupt, "
+ "IntrStatus=0x%4.4x.\n", dev->name, status);
+
+ /* Clear all interrupt sources. */
+ RTL_W16 (IntrStatus, 0xffff);
+ }
+
DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n",
dev->name, RTL_R16 (IntrStatus));
return IRQ_RETVAL(handled);

_