Re: reordering pci interrupts?

From: Martin Mares (mj@suse.cz)
Date: Sun Nov 19 2000 - 14:22:10 EST


Hello!

> I have a motherboard with a broken bios that is unable to set interrupts
> correctly, i.e. it initializes the devices corerctly but swaps the
> interrupts for slot1/slot3 and slot2/slot4.
>
> Now, is there a way to forcefully re-order the pci-interrupts? I do not
> have an io-apic (thus no pirq=xxx), and I tried to poke the interrupt
> values directly into /proc/bus/pic/*/*, but the kernel has it's own idea.
>
> Thanks a lot for any info (I guess I'll just patch the kernel).

Please try this patch and boot with "pci=autoirq" on the kernel command line.

                                Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"veni, vidi, nuclei deceiri - I came, I saw, I core dumped"

--- arch/i386/kernel/pci-pc.c.mj Sun Nov 19 20:18:14 2000 +++ arch/i386/kernel/pci-pc.c Sun Nov 19 20:18:14 2000 @@ -1035,6 +1035,9 @@ } else if (!strncmp(str, "lastbus=", 8)) { pcibios_last_bus = simple_strtol(str+8, NULL, 0); return NULL; + } else if (!strcmp(str, "autoirq")) { + pci_probe |= PCI_AUTOIRQ; + return NULL; } return str; } --- arch/i386/kernel/pci-i386.h.mj Sun Nov 19 20:18:32 2000 +++ arch/i386/kernel/pci-i386.h Sun Nov 19 20:18:32 2000 @@ -18,6 +18,7 @@ #define PCI_NO_SORT 0x100 #define PCI_BIOS_SORT 0x200 #define PCI_NO_CHECKS 0x400 +#define PCI_AUTOIRQ 0x800 #define PCI_ASSIGN_ROMS 0x1000 #define PCI_BIOS_IRQ_SCAN 0x2000 --- arch/i386/kernel/pci-irq.c.mj Sun Nov 19 20:18:50 2000 +++ arch/i386/kernel/pci-irq.c Sun Nov 19 20:18:50 2000 @@ -487,7 +487,7 @@ * If the BIOS has set an out of range IRQ number, just ignore it. * Also keep track of which IRQ's are already in use. */ - if (dev->irq >= 16) { + if (dev->irq >= 16 || (pci_probe & PCI_AUTOIRQ)) { DBG("%s: ignoring bogus IRQ %d\n", dev->slot_name, dev->irq); dev->irq = 0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 21:00:17 EST