aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/tulip/timer.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2006-09-08 11:15:38 -0700
committerJeff Garzik <jeff@garzik.org>2006-09-11 09:05:37 -0400
commit0bb3cf726b37c13abce9f9134a68b94aa10e8803 (patch)
tree52a1fe8fdd08bdc088c1fb95957ecf5e698b8def /drivers/net/tulip/timer.c
parent40c0d87948ab635e814f45664259d4cc193651a1 (diff)
[PATCH] Defer tulip_select_media() to process context
Move tulip_select_media() processing to a workqueue, instead of delaying in interrupt context, edited by Kyle McMartin to use kevent thread, instead of creating its own workqueue. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Valerie Henson <val_henson@linux.intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/timer.c')
-rw-r--r--drivers/net/tulip/timer.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c
index f75bc5ecd73..066e5d6bcbd 100644
--- a/drivers/net/tulip/timer.c
+++ b/drivers/net/tulip/timer.c
@@ -18,13 +18,14 @@
#include "tulip.h"
-void tulip_timer(unsigned long data)
+void tulip_media_task(void *data)
{
- struct net_device *dev = (struct net_device *)data;
+ struct net_device *dev = data;
struct tulip_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->base_addr;
u32 csr12 = ioread32(ioaddr + CSR12);
int next_tick = 2*HZ;
+ unsigned long flags;
if (tulip_debug > 2) {
printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode"
@@ -126,6 +127,15 @@ void tulip_timer(unsigned long data)
}
break;
}
+
+
+ spin_lock_irqsave(&tp->lock, flags);
+ if (tp->timeout_recovery) {
+ tulip_tx_timeout_complete(tp, ioaddr);
+ tp->timeout_recovery = 0;
+ }
+ spin_unlock_irqrestore(&tp->lock, flags);
+
/* mod_timer synchronizes us with potential add_timer calls
* from interrupts.
*/