Subject: Interrupt Routing on PCI-PCI Bridges
To: None <tech-kern@netbsd.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: tech-kern
Date: 08/13/2004 21:15:49
Hi.

I am hardening the hp700 PCI code by testing varois PCI devices. One
device is a quad Ethernet card with a DEC DC21152 PCI-PCI bridge and
four tlp(4) behind it. See dmesg(1) output below.

What I don't understand is how interrupts are routed through a PCI-PCI
bridge. To me it looks like the interrupt lines are maped 1:1 from the
secondary to the primary bus. The devices on the primary bus already use
IRQs 1, 3 and 0, so this IRQs are shared. The question now is:=20
Can I detemine what device has caused a shared interrupt?
Or is this impossible and I have to call the interrupt handler of all
devices that share the interrupt in question? (Thus probably calling an
interrupt handler of a device that didn't interrupt.)

dino0 at phantomas0 hpa 0xfff80000 path 8/0 irq 28 ipl 1: Dino V3.1
pci0 at dino0
pci0: i/o space, memory space enabled
ex0 at pci0 dev 1 function 0: 3Com 3c905-TX 10/100 Ethernet (rev. 0x0)
ex0: interrupting at irq 1
ex0: MAC address 00:00:00:00:00:00
ppb0 at pci0 dev 2 function 0: vendor 0x1011 product 0x0024 (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
tlp0 at pci1 dev 4 function 0: DECchip 21140A Ethernet, pass 2.2
tlp0: interrupting at irq 2
tlp0: Ethernet address 00:00:bc:11:d6:10
tlp0: 10baseT, 100baseTX, 10baseT-FDX, 100baseTX-FDX
tlp1 at pci1 dev 5 function 0: DECchip 21140A Ethernet, pass 2.2
tlp1: interrupting at irq 3
tlp1: Ethernet address 00:00:bc:11:d6:11
tlp1: 10baseT, 100baseTX, 10baseT-FDX, 100baseTX-FDX
tlp2 at pci1 dev 6 function 0: DECchip 21140A Ethernet, pass 2.2
tlp2: interrupting at irq 0
tlp2: Ethernet address 00:00:bc:11:d6:12
tlp2: 10baseT, 100baseTX, 10baseT-FDX, 100baseTX-FDX
tlp3 at pci1 dev 7 function 0: DECchip 21140A Ethernet, pass 2.2
tlp3: interrupting at irq 1
tlp3: Ethernet address 00:00:bc:11:d6:13
tlp3: 10baseT, 100baseTX, 10baseT-FDX, 100baseTX-FDX
esiop0 at pci0 dev 19 function 0: Symbios Logic 53c875 (ultra-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at irq 3
scsibus0 at esiop0: 16 targets, 8 luns per target
tlp4 at pci0 dev 20 function 0: DECchip 21143 Ethernet, pass 4.1
tlp4: interrupting at irq 0
tlp4: Ethernet address 00:10:83:03:fd:7a
lxtphy0 at tlp4 phy 1: LXT970 10/100 media interface, rev. 1
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
--=20


tsch=FC=DF,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/