patch-2.0.14 linux/drivers/net/3c509.c

Next file: linux/drivers/net/de4x5.c
Previous file: linux/drivers/block/ide-tape.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.13/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
@@ -47,11 +47,11 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/config.h>	/* for CONFIG_MCA */
+#include <linux/delay.h>	/* for udelay() */
 
 #include <asm/bitops.h>
 #include <asm/io.h>
 
-
 #ifdef EL3_DEBUG
 int el3_debug = EL3_DEBUG;
 #else
@@ -310,28 +310,24 @@
  */
 static ushort read_eeprom(short ioaddr, int index)
 {
-	int timer;
-
 	outw(EEPROM_READ + index, ioaddr + 10);
 	/* Pause for at least 162 us. for the read to take place. */
-	for (timer = 0; timer < 162*4 + 400; timer++)
-		SLOW_DOWN_IO;
+	udelay (200);
 	return inw(ioaddr + 12);
 }
 
 /* Read a word from the EEPROM when in the ISA ID probe state. */
 static ushort id_read_eeprom(int index)
 {
-	int timer, bit, word = 0;
+	int bit, word = 0;
 
 	/* Issue read command, and pause for at least 162 us. for it to complete.
 	   Assume extra-fast 16Mhz bus. */
 	outb(EEPROM_READ + index, id_port);
 
-	/* This should really be done by looking at one of the timer channels. */
-	for (timer = 0; timer < 162*4 + 400; timer++)
-		SLOW_DOWN_IO;
-
+	/* Pause for at least 162 us. for the read to take place. */
+	udelay (200);
+	
 	for (bit = 15; bit >= 0; bit--)
 		word = (word << 1) + (inb(id_port) & 0x01);
 

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