patch-2.0.31 linux/drivers/net/lance32.c

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

diff -u --recursive --new-file v2.0.30/linux/drivers/net/lance32.c linux/drivers/net/lance32.c
@@ -273,6 +273,9 @@
         outw(0x0002, ioaddr+LANCE_ADDR);
 	outw(0x0002, ioaddr+LANCE_BUS_IF);
 
+	/* Reset the LANCE - this should prevent any more interrupts from arriving */
+	inw(ioaddr+LANCE_RESET);
+
 	if (lance32_debug > 0)
 		printk(version);
 
@@ -451,7 +454,7 @@
 	/* Transmitter timeout, serious problems. */
 	if (dev->tbusy) {
 		int tickssofar = jiffies - dev->trans_start;
-		if (tickssofar < 20)
+		if (tickssofar < 60)		/* It can take this long to run through the 16 retries */
 			return 1;
 		outw(0, ioaddr+LANCE_ADDR);
 		printk("%s: transmit timed out, status %4.4x, resetting.\n",
@@ -469,8 +472,9 @@
 					   lp->rx_ring[i].base, -lp->rx_ring[i].buf_length,
 					   lp->rx_ring[i].msg_length);
 			for (i = 0 ; i < TX_RING_SIZE; i++)
-				printk("%s %08x %04x %04x", i & 0x3 ? "" : "\n ",
+				printk("%s %08x %04x %04x %08x  ", i & 0x1 ? "" : "\n ",
 					   lp->tx_ring[i].base, -lp->tx_ring[i].length,
+					   lp->tx_ring[i].status,
 					   lp->tx_ring[i].misc);
 			printk("\n");
 		}
@@ -633,6 +637,9 @@
 				dirty_tx += TX_RING_SIZE;
 			}
 #endif
+
+			if (dev->tbusy)
+				dev->trans_start = jiffies; /* We are just starting the next transmit */
 
 			if (lp->tx_full && dev->tbusy
 				&& dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) {

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