diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2006-09-08 14:15:38 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-11 09:05:37 -0400 |
commit | 0bb3cf726b37c13abce9f9134a68b94aa10e8803 (patch) | |
tree | 52a1fe8fdd08bdc088c1fb95957ecf5e698b8def /drivers/net/tulip/timer.c | |
parent | 40c0d87948ab635e814f45664259d4cc193651a1 (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.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c index f75bc5ecd73c..066e5d6bcbd8 100644 --- a/drivers/net/tulip/timer.c +++ b/drivers/net/tulip/timer.c | |||
@@ -18,13 +18,14 @@ | |||
18 | #include "tulip.h" | 18 | #include "tulip.h" |
19 | 19 | ||
20 | 20 | ||
21 | void tulip_timer(unsigned long data) | 21 | void tulip_media_task(void *data) |
22 | { | 22 | { |
23 | struct net_device *dev = (struct net_device *)data; | 23 | struct net_device *dev = data; |
24 | struct tulip_private *tp = netdev_priv(dev); | 24 | struct tulip_private *tp = netdev_priv(dev); |
25 | void __iomem *ioaddr = tp->base_addr; | 25 | void __iomem *ioaddr = tp->base_addr; |
26 | u32 csr12 = ioread32(ioaddr + CSR12); | 26 | u32 csr12 = ioread32(ioaddr + CSR12); |
27 | int next_tick = 2*HZ; | 27 | int next_tick = 2*HZ; |
28 | unsigned long flags; | ||
28 | 29 | ||
29 | if (tulip_debug > 2) { | 30 | if (tulip_debug > 2) { |
30 | printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode" | 31 | printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode" |
@@ -126,6 +127,15 @@ void tulip_timer(unsigned long data) | |||
126 | } | 127 | } |
127 | break; | 128 | break; |
128 | } | 129 | } |
130 | |||
131 | |||
132 | spin_lock_irqsave(&tp->lock, flags); | ||
133 | if (tp->timeout_recovery) { | ||
134 | tulip_tx_timeout_complete(tp, ioaddr); | ||
135 | tp->timeout_recovery = 0; | ||
136 | } | ||
137 | spin_unlock_irqrestore(&tp->lock, flags); | ||
138 | |||
129 | /* mod_timer synchronizes us with potential add_timer calls | 139 | /* mod_timer synchronizes us with potential add_timer calls |
130 | * from interrupts. | 140 | * from interrupts. |
131 | */ | 141 | */ |