Subject: Re: de(4) and transmit underflow
To: Chuck <ckane@best.com>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: port-i386
Date: 04/21/1998 15:25:59
"Chuck" said:
> Sometimes you have to share interrupts.  This system has an IDE disk
> and four quad-port ethernet cards.

I do hope you mean 5 quad-port ethernet cards, since you seem to have
20 'de' devices...  8-)

(BTW, it looks like your 'dmesg' output is incomplete... 8-)


>    9: de1 de4 de10 de15 de18
>   10: de0 de3 de6 de7 de8 de9 de13 de14 de16 de17 wss0
>   11: de2 de5 de11 de12 de19
> [ ... ]
>
> The "transmit underflow" error happens only on de0.  I do not know why
> so many devices are put on irq10 instead of being spread more evenly.

This is an interesting artifact of the way PCI interrupt mapping is
done on your (and many) PCs.

Many PC chipsets have 4 'PCI IRQ' registers, of which one is often
devoted to an on-board PCI device.  that leaves three PCI IRQ (pirq)
registers to map the remaining 4 PCI INT lines, and that generally
means that 2 INT lines go to 1, and 1 INT line goes to each of the
remaining two.

That is, there are a total of 3 IRQ lines shared by PCI interrupts
(excluding a typical specially-handled on-board device) for all
devices in a PC.

When you put a PPB in a machine, that doesn't change that -- all the
PPB does is translate the secondary bus INT lines to primary bus INT
lines.  It can't expand the fact that the primary bus slot it's
plugged into has only 4 INT lines, or that those 4 INT lines usually
get mapped to 3 IRQ lines in PCs.

Take a look in the PPB driver for a quick note about that interrupt
swizzling.


Jason Thorpe said:
> If you tell the BIOS to reserve IRQ 10 for the ISA (i.e. PnP WSS :-),
> then it will probably more evenly divide them between 9 and 11.

No, it'll move the ones on '10' to a different IRQ.  The INT line ->
pirq mapping is usually done in hardware, and the BIOS probably can't
change it.

Depending on how your pirqs set up in hardware, if you want a more
even distribution, introducing another PPB (e.g. via an expansion
box), moving the four-port cards that are attached to pci0 down a
level, might help, but I wouldn't hold my breath.

No matter what you do, you probably can't do what would _really_ be
best: put 'de' interrupts on other, entirely different, lines.
That's an artifact of (losing) PC hardware.  8-)

It's worth noting that some/many alpha systems (esp. the AlphaStation
500 and 600, if i recall) get this correct, assigning a distinct
interrupt line to each (or close to "each") INT line for each PCI slot
in the machine.  You still lose because you have only 4 interrupts per
PCI slot (i.e. if you put an expansion box on, all cards in that
expansion box will have to share 4 IRQs), but for the case of devices
like 4-port ethernets where each network chip gets its own IRQ, that
kind of situation is just about ideal.




cgd
(not speaking for Digital, and very fond of alpha systems long before
I came to work here.  8-)