Skip to contentSkip to conversation

Tulip Driver Bug

parisc-linux John Marvin 2 participants 2 messages Feb 23, 2000

lore
Share & tools
lore
#0 lore raw

I've been having reliability problems with networking on my J5000. I tracked the problem down to this piece of code in tulip_interrupt():

    if (--work_budget < 0) {
	    if (tulip_debug > 1)
		    printk(KERN_WARNING "%s: Too much work during an interrupt, "
			       "csr5=0x%8.8x.\n", dev->name, csr5);
	    /* Acknowledge all interrupt sources. */
	    outl(0x8001ffff, ioaddr + CSR5);
	    /* Clear all interrupting sources, set timer to re-enable. */
	    outl(((~csr5) & 0x0001ebef) | AbnormalIntr | TimerInt,
		     ioaddr + CSR7);
	    outl(12, ioaddr + CSR11);
	    break;
    }

My understanding is that this code tries to defer work until later because too many incoming packets have been handled during the current interrupt. The problem is that there is no later. Once this code is run I stop seeing iosapic interrupts, and a little later I get some Tx Hung messages, one or two more interrupts, and then that is it. The bug may not actually be in the above code, i.e. it may be in the timer re-enable that is mentioned in the comment above.

If I ifdef the above code out, the driver is fairly reliable. I've run tests with more than 20 sockets open simultaneously.

I believe the reason I see this problem more than others is probably due to the fact that I am running on a fairly high traffic network, so the machine is seeing a lot more packets. You should be able to reproduce the problem by reducing the value of max_interrupt_work.

I could continue working on this problem to track it to root cause, but at this point I would have to spend more time learning the driver and the tulip hardware. Perhaps someone with more experience with this driver could find the problem with less effort.

I haven't tried this on another machine like an A-180 to determine if the problem is only on iosapic based machines or if the problem is general to all tulip based lan interfaces.

John Marvin
[email protected]

#1 lore raw
Quoted 3 lines · John Marvin

My understanding is that this code tries to defer work until later because too many incoming packets have been handled during the current interrupt. The problem is that there is no later.

John,
thanks for bringing it this far.

Can someone verify the IRQ line is remains asserted?

If the IRQ line is asserted, this sounds like a problem in iosapic code. I've seen this behavior before when iosapic_isr() didn't write the correct value to the EOI register. I'll review the iosapic code. But if someone could give me confidence the IRQ is asserted, I'd appreciate it.

thanks,
grant

Grant Grundler
Unix Development Lab
+1.408.447.7253