patch-2.1.126 linux/arch/i386/kernel/bios32.c

Next file: linux/arch/i386/kernel/mca.c
Previous file: linux/arch/i386/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/arch/i386/kernel/bios32.c linux/arch/i386/kernel/bios32.c
@@ -346,7 +346,7 @@
  * attempt to make use of direct access hints provided by the PCI BIOS).
  *
  * This should be close to trivial, but it isn't, because there are buggy
- * chipsets (yes, you guessed it, by Intel) that have no class ID.
+ * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
  */
 __initfunc(int pci_sanity_check(struct pci_access *a))
 {
@@ -356,9 +356,9 @@
 		return 1;
 	for(dfn=0; dfn < 0x100; dfn++)
 		if ((!a->read_config_word(0, dfn, PCI_CLASS_DEVICE, &x) &&
-		     x == PCI_CLASS_BRIDGE_HOST) ||
+		     (x == PCI_CLASS_BRIDGE_HOST || x == PCI_CLASS_DISPLAY_VGA)) ||
 		    (!a->read_config_word(0, dfn, PCI_VENDOR_ID, &x) &&
-		     x == PCI_VENDOR_ID_INTEL))
+		     (x == PCI_VENDOR_ID_INTEL || x == PCI_VENDOR_ID_COMPAQ)))
 			return 1;
 	DBG("PCI: Sanity check failed\n");
 	return 0;
@@ -1063,6 +1063,16 @@
 			if (pin) {
 				pin--;		/* interrupt pins are numbered starting from 1 */
 				irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
+				if (irq < 0 && dev->bus->parent) { /* go back to the bridge */
+					struct pci_dev * bridge = dev->bus->self;
+
+					pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+					irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, 
+							PCI_SLOT(bridge->devfn), pin);
+					if (irq >= 0)
+						printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n", 
+							bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
+				}
 				if (irq >= 0) {
 					printk("PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
 						dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov