diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-12-11 19:47:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-12-11 19:47:38 +0000 |
commit | 784057872389af433017dcdacadd1e9a82c701d6 (patch) | |
tree | ddf09be0489246a3e0274d6d1b17381fd7029c8b /sys/arch/i386 | |
parent | cf8c382c7360f5cca81208b17363bcea5f55a4b7 (diff) |
On i386, swizzle interrupts for devices for which we don't have explicit
inetrrupt routing information.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c index 79c7b6779b8..e998ae914f9 100644 --- a/sys/arch/i386/pci/pci_machdep.c +++ b/sys/arch/i386/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.35 2006/11/11 21:47:52 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.36 2006/12/11 19:47:37 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */ /*- @@ -480,6 +480,20 @@ pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) return 0; } } + if (mip == NULL && pa->pa_bridgetag) { + int bridgebus, bridgedev; + + pci_decompose_tag(pc, *pa->pa_bridgetag, + &bridgebus, &bridgedev, NULL); + mpspec_pin = (bridgedev << 2)|((pin + dev - 1) & 0x3); + for (mip = mp_busses[bridgebus].mb_intrs; mip != NULL; + mip = mip->next) { + if (mip->bus_pin == mpspec_pin) { + ihp->line = mip->ioapic_ih | line; + return 0; + } + } + } if (mip == NULL && mp_isa_bus) { for (mip = mp_isa_bus->mb_intrs; mip != NULL; mip = mip->next) { |