From 784057872389af433017dcdacadd1e9a82c701d6 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 11 Dec 2006 19:47:38 +0000 Subject: On i386, swizzle interrupts for devices for which we don't have explicit inetrrupt routing information. ok deraadt@ --- sys/arch/i386/pci/pci_machdep.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/pci') 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) { -- cgit v1.2.3