From: Daniel Ritz <daniel.ritz@gmx.ch>

Acer travelmate 360 has a broken interrupt routing.  There's an interrupt
storm on irq 10 w/o this patch as soon as yenta_socket is loaded.  The
problem has been seen on different machines (reported on l-k and on
pcmcia-cs list).  There's also an USB controller on the same interrupt line
as the CB which also works fine after the patch.  And routing via ACPI
fails too.


---

 25-akpm/arch/i386/kernel/dmi_scan.c |   29 +++++++++++++++++++++++++++++
 25-akpm/arch/i386/pci/irq.c         |    8 ++++++++
 2 files changed, 37 insertions(+)

diff -puN arch/i386/kernel/dmi_scan.c~fix-acer-travelmate-360-interrupt-routing arch/i386/kernel/dmi_scan.c
--- 25/arch/i386/kernel/dmi_scan.c~fix-acer-travelmate-360-interrupt-routing	2004-04-10 14:50:25.016951784 -0700
+++ 25-akpm/arch/i386/kernel/dmi_scan.c	2004-04-10 14:50:25.025950416 -0700
@@ -360,6 +360,22 @@ static __init int fix_broken_hp_bios_irq
 }
 
 /*
+ * Work around broken Acer TravelMate 360 Notebooks which assign Cardbus to
+ * IRQ 11 even though it is actually wired to IRQ 10
+ */
+static __init int fix_acer_tm360_irqrouting(struct dmi_blacklist *d)
+{
+#ifdef CONFIG_PCI
+	extern int acer_tm360_irqrouting;
+	if (acer_tm360_irqrouting == 0)
+	{
+		acer_tm360_irqrouting = 1;
+		printk(KERN_INFO "%s detected - fixing broken IRQ routing\n", d->ident);
+	}
+#endif
+	return 0;
+}
+/*
  *  Check for clue free BIOS implementations who use
  *  the following QA technique
  *
@@ -894,6 +910,13 @@ static __initdata struct dmi_blacklist d
 			MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook Model GE"),
 			MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736")
 			} },
+
+	{ fix_acer_tm360_irqrouting, "Acer TravelMate 36x Laptop", {
+			MATCH(DMI_SYS_VENDOR, "Acer"),
+			MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+			NO_MATCH, NO_MATCH
+			} },
+
  
 
 	/*
@@ -1032,6 +1055,12 @@ static __initdata struct dmi_blacklist d
 			MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
 			NO_MATCH }},
 
+	{ disable_acpi_pci, "Acer TravelMate 36x Laptop", {
+			MATCH(DMI_SYS_VENDOR, "Acer"),
+			MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+			NO_MATCH, NO_MATCH
+			} },
+
 #endif
 
 	{ NULL, }
diff -puN arch/i386/pci/irq.c~fix-acer-travelmate-360-interrupt-routing arch/i386/pci/irq.c
--- 25/arch/i386/pci/irq.c~fix-acer-travelmate-360-interrupt-routing	2004-04-10 14:50:25.018951480 -0700
+++ 25-akpm/arch/i386/pci/irq.c	2004-04-10 14:50:25.023950720 -0700
@@ -23,6 +23,7 @@
 #define PIRQ_VERSION 0x0100
 
 int broken_hp_bios_irq9;
+int acer_tm360_irqrouting;
 
 static struct irq_routing_table *pirq_table;
 
@@ -749,6 +750,13 @@ static int pcibios_lookup_irq(struct pci
 		r->set(pirq_router_dev, dev, pirq, 11);
 	}
 
+	/* same for Acer Travelmate 360, but with CB and irq 11 -> 10 */
+	if (acer_tm360_irqrouting && pirq == 0x63 && dev->irq == 11) {
+		dev->irq = 10;
+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
+		r->set(pirq_router_dev, dev, pirq, 10);
+	}
+
 	/*
 	 * Find the best IRQ to assign: use the one
 	 * reported by the device if possible.

_