[realtek] Re: natsemi problem

Donald Becker becker@scyld.com
Fri, 29 Dec 2000 02:41:34 -0500 (EST)


On Mon, 25 Dec 2000, Manfred wrote:

> [Since there is no natsemi list, I've choosen the realtek list since
> both drivers are described on the same page ;-)
> 
> It seems that the fifo setup of the natsemi driver is wrong:
> it causes lots of "Something Wicked happened" messages, and it violates
> the spec: the tx DMA limit must be <= the tx fill threshold.(page 51 of
> DP83815.pdf)

My datasheet copy does not list that restriction.
It only lists that the restriction
     Tx drain threshold <= (Tx FIFO size - Tx fill threshold)
     64 <= (2048 - 256)

> See this thread on linux-kernel:
> http://boudicca.tux.org/hypermail/linux-kernel/2000week53/0090.html

Ahhh, your real change wasn't with the Tx DMA burst size.
You increased the initial Tx threshold!

That masked the underrun problem, but didn't eliminate it.
It also increased the Tx latency for all machines.

The correct fix is to dynamically increase the Tx threshold by adding the
following code to the netdev_error() routine:

	if (intr_status & IntrTxUnderrun) {
		if ((np->tx_config & 0x3f) < 62)
			np->tx_config += 2;
		writew(np->tx_config, ioaddr + TxConfig);
	}

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