Re: 2.1.XX NE2000 errors

Brian May (bam@snoopy.apana.org.au)
Thu, 25 Feb 1999 18:39:31 +1100


Alan Cox wrote:
>No SMP means it definitely shouldnt be seeing problems

It shouldn't, but I definitely get them. It starts off with:
Feb 24 20:45:10 snoopy kernel: eth0: unexpected TX-done interrupt, lasttx=20.
Feb 24 20:45:10 snoopy last message repeated 8 times
Feb 24 20:45:10 snoopy kernel: eth0: Too much work at interrupt, status 0xff

It is not and IRQ conflict. It only seems to occur under high network load
(the load on my network is mostly light). There may be other criteria, too,
however I have not been able to isolate it yet. From this point on, my
network card has crashed, and requires a reboot to fix.

Then the messages continues off as:

Hw. address read/write mismap 0
Hw. address read/write mismap 1
Hw. address read/write mismap 2
Hw. address read/write mismap 3
Hw. address read/write mismap 4
Hw. address read/write mismap 5
eth0: trigger_send() called with the transmitter busy.

I looked up the error message I get in 8390.c

Based on this I have the following questions:

1. Does the fact that "Hw. address read/write mismap" appears, and this
is in "NS8390_init" indicate that an attempt is being made to reset
the card? I get the impression that the hardware address looks like
it might be invalid from the message, however, the output of
"ifconfig eth0" shows the correct value. If however, the address
has been currupted, it would explain everything else, however
I don't understand how the test works.

2. What would cause "unexpected TX-done" other then IRQ conflict?

3. I find this line in "ei_tx_intr" highly suspicious, however I don't
understand what it is used for:

ei_local->txqueue--;

The reason I am suspicious, is that it appears to me that it decreases
the size of the txqueue, ie it assumes that something has been transmitted.
However, this is also declared an "unexpected TX-done interrupt", meaning
(I guess) that nothing was transmitted, so ei_local->txqueue would
become invalid. Please correct me if I am wrong; I know nothing
about the Linux kernel source or Ethernet adaptors, but am looking
at the source because this problem is getting to be irratating, and
I have come to expect higher reliability from Linux.

However, if I am right, it might explain some messages, such as
eth0: trigger_send() called with the transmitter busy.
if the txqueue size has become invalidated. I don't think it is
that simple though.

I have to wonder if it is because my Ethernet card is slightly
incompatable with 2.1.X and 2.2.X, however, I never had problems
with 2.0.X...

static void ei_tx_intr(struct device *dev)
{
[...]
ei_local->txqueue--;

if (ei_local->tx1 < 0)
{
[...]
}
else if (ei_local->tx2 < 0)
{
[...]
}
else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n",
dev->name, ei_local->lasttx);
[...]
}

void ei_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
[...]
if (nr_serviced >= MAX_SERVICE)
{
printk(KERN_WARNING "%s: Too much work at interrupt, status %#2.2x\n",
dev->name, interrupts);
outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */
} else {
[...]
}

void NS8390_init(struct device *dev, int startp)
{
[...]
for(i = 0; i < 6; i++)
{
outb_p(dev->dev_addr[i], e8390_base + EN1_PHYS_SHIFT(i));
if(inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
printk(KERN_ERR "Hw. address read/write mismap %d\n",i); }
}
[...]
}

[...]
static void NS8390_trigger_send(struct device *dev, unsigned int length,
int start_page)
{
int e8390_base = dev->base_addr;
struct ei_device *ei_local = (struct ei_device *) dev->priv;

outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);

if (inb_p(e8390_base) & E8390_TRANS)
{
printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n",
dev->name);
return;
}
outb_p(length & 0xff, e8390_base + EN0_TCNTLO);
outb_p(length >> 8, e8390_base + EN0_TCNTHI);
outb_p(start_page, e8390_base + EN0_TPSR);
outb_p(E8390_NODMA+E8390_TRANS+E8390_START, e8390_base+E8390_CMD);
}

Brian May <bam@snoopy.apana.org.au>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/