[PATCH 5/13] 2.6.7-rc1-mm1, Port HP Pavilion irq routing quirk to new DMI probing

From: Andrey Panin
Date: Fri May 28 2004 - 07:19:15 EST


make pci irq routing code use
dmi_check_system() function
and make broken_hp_bios_irq9 variable static.

diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/kernel/dmi_scan.c Wed Apr 28 23:52:39 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/kernel/dmi_scan.c Wed Apr 28 23:53:48 2004
@@ -235,23 +235,6 @@ static __init int disable_smbus(struct d
}

/*
- * Work around broken HP Pavilion Notebooks which assign USB to
- * IRQ 9 even though it is actually wired to IRQ 11
- */
-static __init int fix_broken_hp_bios_irq9(struct dmi_system_id *d)
-{
-#ifdef CONFIG_PCI
- extern int broken_hp_bios_irq9;
- if (broken_hp_bios_irq9 == 0)
- {
- broken_hp_bios_irq9 = 1;
- printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
- }
-#endif
- return 0;
-}
-
-/*
* HP Proliant 8500 systems can't use i8042 in mux mode,
* or they instantly reboot.
*/
@@ -466,14 +449,6 @@ static __initdata struct dmi_system_id d
DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
} },
#endif
- { fix_broken_hp_bios_irq9, "HP Pavilion N5400 Series Laptop", {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
- DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
- } },
-
-

/*
* SMBus / sensors settings
diff -urpN -X /usr/share/dontdiff linux-2.6.7-rc1-mm1.vanilla/arch/i386/pci/irq.c linux-2.6.7-rc1-mm1/arch/i386/pci/irq.c
--- linux-2.6.7-rc1-mm1.vanilla/arch/i386/pci/irq.c Wed Apr 28 22:56:09 2004
+++ linux-2.6.7-rc1-mm1/arch/i386/pci/irq.c Wed Apr 28 23:53:01 2004
@@ -12,6 +12,7 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
+#include <linux/dmi.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/io_apic.h>
@@ -22,7 +23,7 @@
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
#define PIRQ_VERSION 0x0100

-int broken_hp_bios_irq9;
+static int broken_hp_bios_irq9;

static struct irq_routing_table *pirq_table;

@@ -893,12 +894,41 @@ static void __init pcibios_fixup_irqs(vo
}
}

+/*
+ * Work around broken HP Pavilion Notebooks which assign USB to
+ * IRQ 9 even though it is actually wired to IRQ 11
+ */
+static int __init fix_broken_hp_bios_irq9(struct dmi_system_id *d)
+{
+ if (!broken_hp_bios_irq9) {
+ broken_hp_bios_irq9 = 1;
+ printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+ }
+ return 0;
+}
+
+static struct dmi_system_id __initdata pciirq_dmi_table[] = {
+ {
+ .callback = fix_broken_hp_bios_irq9,
+ .ident = "HP Pavilion N5400 Series Laptop",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_BIOS_VERSION, "GE.M1.03"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
+ DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
+ },
+ },
+ { }
+};
+
static int __init pcibios_irq_init(void)
{
DBG("PCI: IRQ init\n");

if (pcibios_enable_irq || raw_pci_ops == NULL)
return 0;
+
+ dmi_check_system(pciirq_dmi_table);

pirq_table = pirq_find_routing_table();


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/