Intel 82559 support with eepro100.c driver

Keith Packard keithp@ncd.com
Thu Jun 24 21:30:40 1999


This is a multi-part message in MIME format.
--------------E262E153CF25D81F40B7F9F5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm running an Intel 82559 ethernet chip and found a minor
problem with using the eepro100 driver; they apparently
now require the CU_CMD_BASE register to be configured
before issuing a CU_STATSADDR request; I don't know
if the CU_STATSADDR request is now an offset from
CU_CMD_BASE, but the result of *not* issuing this
command is that the 82559 locks up.  The patch
is simple, move the sequence for initializing the CU_CMD_BASE
above the CU_STATSADDR command:

This diff is against 0.99B, but the same code sequence
occurs in 1.06.

Keith Packard
keithp@ncd.com
--------------E262E153CF25D81F40B7F9F5
Content-Type: text/plain; charset=us-ascii; name="eepro100.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="eepro100.diff"

--- eepro100.c	Mon Jun 21 23:32:50 1999
+++ /local/src/linux300/linux/drivers/net/eepro100.c	Thu Mar 25 11:11:50 1999
@@ -797,10 +797,6 @@
 
 	MOD_INC_USE_COUNT;
 
-	wait_for_cmd_done(ioaddr + SCBCmd);
-	outl(0, ioaddr + SCBPointer);
-	outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd);
-
 	/* Load the statistics block address. */
 	wait_for_cmd_done(ioaddr + SCBCmd);
 	outl(virt_to_bus(&sp->lstats), ioaddr + SCBPointer);
@@ -833,6 +829,10 @@
 	sp->cur_tx = 1;
 	sp->dirty_tx = 0;
 	sp->tx_full = 0;
+
+	wait_for_cmd_done(ioaddr + SCBCmd);
+	outl(0, ioaddr + SCBPointer);
+	outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd);
 
 	dev->if_port = sp->default_port;
 

--------------E262E153CF25D81F40B7F9F5--