summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2005-10-20 15:12:28 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2005-10-20 15:12:28 +0000
commit44a0fc7a102cdc64ab9bf99e75e4c9288afdcfc7 (patch)
tree5c4e70749c1d67f7e3e47d1f7eb6f73143deb204 /sys/arch/i386
parent9508beba0f160c758f20577acb1eed33718fce2a (diff)
fix a long-standing bug in "preserving" bios mapped irqs.
in case bios did not provide routing info for those they would be falsely routed often to wrong pins. also testing by henning@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/pci/pci_intr_fixup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/i386/pci/pci_intr_fixup.c b/sys/arch/i386/pci/pci_intr_fixup.c
index 63c034aa19c..78ec6689512 100644
--- a/sys/arch/i386/pci/pci_intr_fixup.c
+++ b/sys/arch/i386/pci/pci_intr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_intr_fixup.c,v 1.42 2005/10/20 15:09:31 mickey Exp $ */
+/* $OpenBSD: pci_intr_fixup.c,v 1.43 2005/10/20 15:12:27 mickey Exp $ */
/* $NetBSD: pci_intr_fixup.c,v 1.10 2000/08/10 21:18:27 soda Exp $ */
/*
@@ -684,15 +684,17 @@ pci_intr_header_fixup(pc, tag, ihp)
/* believe PCI IRQ Routing table */
p = " WARNING: overriding";
ihp->line = l->irq;
- } else
+ } else {
/* believe PCI Interrupt Configuration Register (default) */
p = " WARNING: preserving";
+ ihp->line = l->irq = irq;
+ }
if (pcibios_flags & PCIBIOS_INTRDEBUG) {
register pcireg_t id = pci_conf_read(pc, tag, PCI_ID_REG);
- printf("%d:%d:%d %04x:%04x pin %c clink 0x%02x irq %d stage %d"
- "%s irq %d\n", bus, device, function,
+ printf("\n%d:%d:%d %04x:%04x pin %c clink 0x%02x irq %d "
+ "stage %d %s irq %d\n", bus, device, function,
PCI_VENDOR(id), PCI_PRODUCT(id), '@' + ihp->pin, l->clink,
((l->irq == I386_PCI_INTERRUPT_LINE_NO_CONNECTION)?
-1 : l->irq), l->fixup_stage, p, irq);