patch-2.1.85 linux/drivers/net/8390.c
Next file: linux/drivers/net/de4x5.c
Previous file: linux/drivers/char/hfmodem/Config.in
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Tue Feb 3 15:28:34 1998
- Orig file:
v2.1.84/linux/drivers/net/8390.c
- Orig date:
Wed Oct 22 08:27:31 1997
diff -u --recursive --new-file v2.1.84/linux/drivers/net/8390.c linux/drivers/net/8390.c
@@ -54,6 +54,8 @@
#include <asm/uaccess.h>
#include <asm/bitops.h>
#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/delay.h>
#include <linux/errno.h>
#include <linux/fcntl.h>
#include <linux/in.h>
@@ -185,10 +187,12 @@
/* Mask interrupts from the ethercard. */
outb_p(0x00, e8390_base + EN0_IMR);
+ disable_irq(dev->irq);
synchronize_irq();
if (dev->interrupt) {
printk("%s: Tx request while isr active.\n",dev->name);
outb_p(ENISR_ALL, e8390_base + EN0_IMR);
+ enable_irq(dev->irq);
ei_local->stat.tx_errors++;
dev_kfree_skb(skb, FREE_WRITE);
return 0;
@@ -226,6 +230,7 @@
ei_local->irqlock = 0;
dev->tbusy = 1;
outb_p(ENISR_ALL, e8390_base + EN0_IMR);
+ enable_irq(dev->irq);
ei_local->stat.tx_errors++;
return 1;
}
@@ -272,6 +277,7 @@
/* Turn 8390 interrupts back on. */
ei_local->irqlock = 0;
outb_p(ENISR_ALL, e8390_base + EN0_IMR);
+ enable_irq(dev->irq);
dev_kfree_skb (skb, FREE_WRITE);
ei_local->stat.tx_bytes += send_length;
@@ -608,7 +614,6 @@
static void ei_rx_overrun(struct device *dev)
{
int e8390_base = dev->base_addr;
- unsigned long wait_start_time;
unsigned char was_txing, must_resend = 0;
struct ei_device *ei_local = (struct ei_device *) dev->priv;
@@ -629,9 +634,7 @@
* it "is not a reliable indicator and subsequently should be ignored."
* We wait at least 10ms.
*/
- wait_start_time = jiffies;
- while (jiffies - wait_start_time <= 1*HZ/100)
- barrier();
+ udelay(10*1000);
/*
* Reset RBCR[01] back to zero as per magic incantation.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov