patch-2.1.68 linux/drivers/net/eepro.c

Next file: linux/drivers/net/eepro100.c
Previous file: linux/drivers/net/e2100.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/drivers/net/eepro.c linux/drivers/net/eepro.c
@@ -102,6 +102,7 @@
 #include <asm/dma.h>
 #include <linux/errno.h>
 #include <linux/init.h>
+#include <linux/delay.h>
 
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
@@ -652,8 +653,8 @@
 
 	outb(SEL_RESET_CMD, ioaddr);
 	/* We are supposed to wait for 2 us after a SEL_RESET */
-	SLOW_DOWN_IO;
-	SLOW_DOWN_IO;
+	
+	udelay(2);
 
 	lp->tx_start = lp->tx_end = XMT_LOWER_LIMIT << 8; /* or = RCV_RAM */
 	lp->tx_last = 0;
@@ -695,8 +696,7 @@
 		/* Try to restart the adaptor. */
 		outb(SEL_RESET_CMD, ioaddr);
 		/* We are supposed to wait for 2 us after a SEL_RESET */
-		SLOW_DOWN_IO;
-		SLOW_DOWN_IO;
+		udelay(2);
 
 		/* Do I also need to flush the transmit buffers here? YES? */
 		lp->tx_start = lp->tx_end = rcv_ram;
@@ -824,9 +824,9 @@
 	/* Update the statistics here. What statistics? */
 
 	/* We are supposed to wait for 200 us after a RESET */
-	SLOW_DOWN_IO;
-	SLOW_DOWN_IO; /* May not be enough? */
 
+	udelay(200);
+	
 	MOD_DEC_USE_COUNT;
 	return 0;
 }
@@ -933,8 +933,7 @@
 
 		/* Acknowledge that the MC setup is done */
 		do { /* We should be doing this in the eepro_interrupt()! */
-			SLOW_DOWN_IO;
-			SLOW_DOWN_IO;
+			udelay(2);
 			if (inb(ioaddr + STATUS_REG) & 0x08)
 			{
 				i = inb(ioaddr);
@@ -962,7 +961,7 @@
 /* IMPORTANT - the 82595 will be set to Bank 0 after the eeprom is read */
 
 /* The delay between EEPROM clock transitions. */
-#define eeprom_delay()	{ int _i = 40; while (--_i > 0) { __SLOW_DOWN_IO; }}
+#define eeprom_delay()	{ udelay(40); }
 #define EE_READ_CMD (6 << 6)
 
 int

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov