1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Handle (for now) trivial one level bridge case so we can get the

slot that the bridge happens to be in so we get interrupts working
on bridged cards.
This commit is contained in:
Matt Jacob 2000-07-13 03:45:11 +00:00
parent 3fbd97427e
commit e8ad1d0707
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63060

View File

@ -618,6 +618,14 @@ mcpcia_setup_intr(device_t dev, device_t child, struct resource *ir, int flags,
mid = mcbus_get_mid(dev); mid = mcbus_get_mid(dev);
gid = mcbus_get_gid(dev); gid = mcbus_get_gid(dev);
if (slot == 0) {
device_t bdev;
/* bridged - get slot from granparent */
/* note that this is broken for all but the most trival case */
bdev = device_get_parent(device_get_parent(child));
slot = pci_get_slot(bdev);
}
if (mid == 5 && slot == 1) { if (mid == 5 && slot == 1) {
irq = 16; /* MID 5, slot 1, is the internal NCR 53c810 */ irq = 16; /* MID 5, slot 1, is the internal NCR 53c810 */
} else if (slot >= 2 && slot <= 5) { } else if (slot >= 2 && slot <= 5) {