* [PATCH] sundance.c: high interrupt load [resent]
@ 2005-02-10 16:36 Andreas Maier
2005-02-11 22:00 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Maier @ 2005-02-10 16:36 UTC (permalink / raw)
To: linux-kernel
In at least some versions of Kernel 2.6 (2.6.8.1, 2.6.11-rc2)
the driver drivers/net/sundance.c creates high interrupt load
(~ 100 interrupts per second) even in case of no network traffic
at all.
It seems that some sort of TX overflow handling is misplaced
and triggers interrupts very often even in case of no data to
send. The TX overflow handling has been moved to a more
appropriate place.
While there, an off by one error of reading the TX status has
also been corrected by moving the read after the break.
Thanks to Jeroen who tested the patch (also with high workload).
Interrupts are down to normal and there are no obvious side
effects.
The attached patch is against kernel 2.6.11-rc2. A copy has been
sent to Donald Becker but unfortunately no response arrived.
Comments are very much appreciated.
Best regards,
-andi
--- sundance.c.orig 2005-01-22 02:48:26.000000000 +0100
+++ sundance.c 2005-01-28 19:55:59.000000000 +0100
@@ -1210,9 +1210,11 @@
}
/* Yup, this is a documentation bug. It cost me *hours*. */
iowrite16 (0, ioaddr + TxStatus);
- tx_status = ioread16 (ioaddr + TxStatus);
- if (tx_cnt < 0)
+ if (tx_cnt < 0) {
+ iowrite32(5000, ioaddr + DownCounter);
break;
+ }
+ tx_status = ioread16 (ioaddr + TxStatus);
}
hw_frame_id = (tx_status >> 8) & 0xff;
} else {
@@ -1278,7 +1280,6 @@
if (netif_msg_intr(np))
printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n",
dev->name, ioread16(ioaddr + IntrStatus));
- iowrite32(5000, ioaddr + DownCounter);
return IRQ_RETVAL(handled);
}
--
| Andreas Maier University of Salzburg |
| (andi@cosy.sbg.ac.at) Department of Computing Sciences |
| Tel. +43/662/8044-6339 Jakob Haringerstr. 2 |
| Fax. +43/662/8044-611 5020 Salzburg / Austria, Europe |
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sundance.c: high interrupt load [resent]
2005-02-10 16:36 [PATCH] sundance.c: high interrupt load [resent] Andreas Maier
@ 2005-02-11 22:00 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-02-11 22:00 UTC (permalink / raw)
To: Andreas Maier; +Cc: linux-kernel
applied to netdev-2.6 so it can get some testing and review.
Please send patches according to the format described at
http://linux.yyz.us/patch-format.html
Particularly, patches should apply with "patch -p1" and should include a
signed-off-by line.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-11 22:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-10 16:36 [PATCH] sundance.c: high interrupt load [resent] Andreas Maier
2005-02-11 22:00 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox