git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
tulip
/
timer.c
diff --git
a/drivers/net/tulip/timer.c
b/drivers/net/tulip/timer.c
index
69f06dc
..
df326fe
100644
(file)
--- a/
drivers/net/tulip/timer.c
+++ b/
drivers/net/tulip/timer.c
@@
-1,7
+1,7
@@
/*
drivers/net/tulip/timer.c
/*
drivers/net/tulip/timer.c
- Maintained by
Jeff Garzik <jgarzik@pobox
.com>
+ Maintained by
Valerie Henson <val_henson@linux.intel
.com>
Copyright 2000,2001 The Linux Kernel Team
Written/copyright 1994-2001 by Donald Becker.
Copyright 2000,2001 The Linux Kernel Team
Written/copyright 1994-2001 by Donald Becker.
@@
-14,23
+14,26
@@
*/
*/
+#include <linux/pci.h>
#include "tulip.h"
#include "tulip.h"
-void tulip_
timer(unsigned long data
)
+void tulip_
media_task(struct work_struct *work
)
{
{
- struct net_device *dev = (struct net_device *)data;
- struct tulip_private *tp = netdev_priv(dev);
- long ioaddr = dev->base_addr;
- u32 csr12 = inl(ioaddr + CSR12);
+ struct tulip_private *tp =
+ container_of(work, struct tulip_private, media_work);
+ struct net_device *dev = tp->dev;
+ void __iomem *ioaddr = tp->base_addr;
+ u32 csr12 = ioread32(ioaddr + CSR12);
int next_tick = 2*HZ;
int next_tick = 2*HZ;
+ unsigned long flags;
if (tulip_debug > 2) {
printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode"
" %8.8x SIA %8.8x %8.8x %8.8x %8.8x.\n",
if (tulip_debug > 2) {
printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode"
" %8.8x SIA %8.8x %8.8x %8.8x %8.8x.\n",
- dev->name, medianame[dev->if_port], i
nl
(ioaddr + CSR5),
- i
nl(ioaddr + CSR6), csr12, inl
(ioaddr + CSR13),
- i
nl(ioaddr + CSR14), inl
(ioaddr + CSR15));
+ dev->name, medianame[dev->if_port], i
oread32
(ioaddr + CSR5),
+ i
oread32(ioaddr + CSR6), csr12, ioread32
(ioaddr + CSR13),
+ i
oread32(ioaddr + CSR14), ioread32
(ioaddr + CSR15));
}
switch (tp->chip_id) {
case DC21140:
}
switch (tp->chip_id) {
case DC21140:
@@
-48,7
+51,7
@@
void tulip_timer(unsigned long data)
if (tulip_debug > 2)
printk(KERN_DEBUG "%s: network media monitor CSR6 %8.8x "
"CSR12 0x%2.2x.\n",
if (tulip_debug > 2)
printk(KERN_DEBUG "%s: network media monitor CSR6 %8.8x "
"CSR12 0x%2.2x.\n",
- dev->name, i
nl
(ioaddr + CSR6), csr12 & 0xff);
+ dev->name, i
oread32
(ioaddr + CSR6), csr12 & 0xff);
break;
}
mleaf = &tp->mtable->mleaf[tp->cur_index];
break;
}
mleaf = &tp->mtable->mleaf[tp->cur_index];
@@
-125,6
+128,15
@@
void tulip_timer(unsigned long data)
}
break;
}
}
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.
*/
/* mod_timer synchronizes us with potential add_timer calls
* from interrupts.
*/
@@
-136,12
+148,12
@@
void mxic_timer(unsigned long data)
{
struct net_device *dev = (struct net_device *)data;
struct tulip_private *tp = netdev_priv(dev);
{
struct net_device *dev = (struct net_device *)data;
struct tulip_private *tp = netdev_priv(dev);
-
long ioaddr = dev
->base_addr;
+
void __iomem *ioaddr = tp
->base_addr;
int next_tick = 60*HZ;
if (tulip_debug > 3) {
printk(KERN_INFO"%s: MXIC negotiation status %8.8x.\n", dev->name,
int next_tick = 60*HZ;
if (tulip_debug > 3) {
printk(KERN_INFO"%s: MXIC negotiation status %8.8x.\n", dev->name,
- i
nl
(ioaddr + CSR12));
+ i
oread32
(ioaddr + CSR12));
}
if (next_tick) {
mod_timer(&tp->timer, RUN_AT(next_tick));
}
if (next_tick) {
mod_timer(&tp->timer, RUN_AT(next_tick));