summaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-03 21:46:06 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-03 21:46:06 +0000
commit3e414096429d55fbc8116171bba3487647bbe638 (patch)
tree2b5fcfd9d16fa3a32c829fc2076f6e3785b43374 /drivers/net/tulip
parent20b23bfcf36fcb2d16d8b844501072541970637c (diff)
Merge with Linux 2.4.0-test3-pre2.
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/21142.c4
-rw-r--r--drivers/net/tulip/interrupt.c4
-rw-r--r--drivers/net/tulip/tulip_core.c11
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c
index 24d0d49c9..8398e1bea 100644
--- a/drivers/net/tulip/21142.c
+++ b/drivers/net/tulip/21142.c
@@ -198,7 +198,7 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
&& (csr12 & 2) == 2) ||
(tp->nway && (csr5 & (TPLnkFail)))) {
/* Link blew? Maybe restart NWay. */
- del_timer(&tp->timer);
+ del_timer_sync(&tp->timer);
t21142_start_nway(dev);
tp->timer.expires = RUN_AT(3*HZ);
add_timer(&tp->timer);
@@ -208,7 +208,7 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
dev->name, medianame[dev->if_port],
(csr12 & 2) ? "failed" : "good");
if ((csr12 & 2) && ! tp->medialock) {
- del_timer(&tp->timer);
+ del_timer_sync(&tp->timer);
t21142_start_nway(dev);
tp->timer.expires = RUN_AT(3*HZ);
add_timer(&tp->timer);
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
index 918357aff..39f87f7b7 100644
--- a/drivers/net/tulip/interrupt.c
+++ b/drivers/net/tulip/interrupt.c
@@ -298,6 +298,10 @@ void tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
tp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff;
tulip_outl_csr(tp, tp->csr6 | csr6_st | csr6_sr, CSR6);
}
+ /*
+ * NB: t21142_lnk_change() does a del_timer_sync(), so be careful if this
+ * call is ever done under the spinlock
+ */
if (csr5 & (TPLnkPass | TPLnkFail | 0x08000000)) {
if (tp->link_change)
(tp->link_change)(dev, csr5);
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index ae777d165..6b0c7dd15 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -19,7 +19,7 @@
*/
-static const char version[] = "Linux Tulip driver version 0.9.6 (May 31, 2000)\n";
+static const char version[] = "Linux Tulip driver version 0.9.7 (June 17, 2000)\n";
#include <linux/module.h>
#include "tulip.h"
@@ -401,11 +401,12 @@ media_picked:
static int
tulip_open(struct net_device *dev)
{
+ int retval;
MOD_INC_USE_COUNT;
-
- if (request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev)) {
+
+ if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) {
MOD_DEC_USE_COUNT;
- return -EBUSY;
+ return retval;
}
tulip_init_ring (dev);
@@ -639,7 +640,7 @@ static void tulip_down (struct net_device *dev)
struct tulip_private *tp = (struct tulip_private *) dev->priv;
unsigned long flags;
- del_timer (&tp->timer);
+ del_timer_sync (&tp->timer);
spin_lock_irqsave (&tp->lock, flags);