Subject: Enumerating PCI busses and pci_machdep code.
To: None <tech-ports@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: tech-ports
Date: 03/03/2006 22:30:27
I am trying to finish up some cleanup on the TAMS 3011 port I'm working on.

I have a table, from the TAMS people, connecting IDSEL values to interrupt
lines.  It works beautifully.

However, I am being stumped by PCI bridge devices.  I have a PCI bridge
device.  The PCI bridge is in the slot that normally probes as device 17.
The devices ON that bridge seem to work if I give them suitable interrupts
derived from the values for device 17 and their own pin numbers.

However... They don't show up as "device 17".  They show up as "bus 1, device
4" and "bus 1, device 5".

Presumably, there's some way in which I should be able, in pci_intr_map, to
figure out that the device I've been handed is on a bus which is entirely
a subset of bus 0, device 17.  But I'm not sure how I should do this; should
I be grovelling around in busses and parents, or should I be doing something
entirely different?

-s