[tulip-bug] troublesome linksys NIC

Donald Becker becker@scyld.com
Tue Dec 18 16:56:02 2001


On Tue, 18 Dec 2001, Keith Warno wrote:

> Donald Becker wrote:
> 
> > Did you see a messge that reported
> >     printk(KERN_WARNING "%s: Tx hung, %d vs. %d.\n",
> 
> 
> OK, it hung, but manages to recover itself.
> 
> eth0: PNIC2 transmit timed out, status e4660000, CSR6/7 01002002 / 
> effffbff CSR12 41e1d0cc, resetting...
> eth0: Tx hung, 1366290 vs. 1366280.
> eth0: PNIC2 transmit timed out, status e4660000, CSR6/7 01002002 / 
> effffbff CSR12 41e1d0cc, resetting...
> 
> I failed to mention earlier that in the past when it has hung it managed 
> to reocover, but obviously would lose touch with the rest of the world 
> for a brief period.

This indicates that the transmitter is idle, but the driver thinks that
10 (TX_QUEUE_LEN) packets have yet to be transmitted.  The driver takes
four seconds (TX_TIMEOUT) to detect this case.

Hmmm, if you really wanted to try to get rid of the messages, at around
line 2658 you could make the following change

	if (q_used_cnt < TX_QUEUE_LEN/2) {/* Typical path */
		flag = 0x60000000; /* No interrupt */
-	} else if (q_used_cnt == TX_QUEUE_LEN/2) {
+	} else if (q_used_cnt < TX_QUEUE_LEN) {
		flag = 0xe0000000; /* Tx-done intr. */
-	} else if (q_used_cnt < TX_QUEUE_LEN) {
-		flag = 0x60000000; /* No Tx-done intr. */
	} else {		/* Leave room for set_rx_mode() to fill entries

This will disable part of the Tx interrupt reduction code when the Tx
queue is more than half full.  I don't see anything wrong with the
current version, but there might be a hole somewhere.  [[ Keep in mind
that the TxIdle interrupt should always cover finishing the transmit
chain. ]]

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993