public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH 2.4.5.1: Fix Via interrupt routing issues
@ 2001-05-13 17:28 Jeff Garzik
  2001-05-13 18:38 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jeff Garzik @ 2001-05-13 17:28 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: arjanv, Alan Cox, Axel Thimm, Manuel A. McLure,
	 Rasmus Bøg Hansen, ARND BERGMANN, Dunlap, Randy,
	Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking,
	John R Lenton

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

For those of you with Via interrupting routing issues (or
interrupt-not-being-delivered issues, etc), please try out this patch
and let me know if it fixes things.  It originates from a tip from
Adrian Cox... thanks Adrian!

-- 
Jeff Garzik      | Game called on account of naked chick
Building 1024    |
MandrakeSoft     |

[-- Attachment #2: via-apic.patch --]
[-- Type: text/plain, Size: 1869 bytes --]

Index: drivers/pci/quirks.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/pci/quirks.c,v
retrieving revision 1.1.1.35
diff -u -r1.1.1.35 quirks.c
--- drivers/pci/quirks.c	2001/05/02 09:26:23	1.1.1.35
+++ drivers/pci/quirks.c	2001/05/13 17:22:18
@@ -12,6 +12,7 @@
  *  use the PowerTweak utility (see http://powertweak.sourceforge.net).
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -238,7 +239,34 @@
 	quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 2);
 }
 
+
+/* we will likely need a better ifdef, something like 
+ * ifdef CONFIG_EXTERNAL_APIC
+ */
+#ifdef CONFIG_X86_IO_APIC 
+extern int nr_ioapics;
+
 /*
+ * VIA 686A/B: If an IO-APIC is active, we need to route all on-chip
+ * devices to the external APIC.
+ */
+static void __init quirk_via_ioapic(struct pci_dev *dev)
+{
+	u8 tmp;
+	
+	if (nr_ioapics < 1)
+		tmp = 0;    /* nothing routed to external APIC */
+	else
+		tmp = 0x1f; /* all known bits (4-0) routed to external APIC */
+		
+	/* Offset 0x58: External APIC IRQ output control */
+	pci_write_config_byte (dev, 0x58, tmp);
+}
+
+#endif /* CONFIG_X86_IO_APIC */
+
+
+/*
  * PIIX3 USB: We have to disable USB interrupts that are
  * hardwired to PIRQD# and may be shared with an
  * external device.
@@ -322,6 +350,14 @@
  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371SB_2,	quirk_piix3_usb },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_2,	quirk_piix3_usb },
 	{ PCI_FIXUP_FINAL,	PCI_ANY_ID,		PCI_ANY_ID,			quirk_cardbus_legacy },
+
+/* we will likely need a better ifdef, something like 
+ * ifdef CONFIG_EXTERNAL_APIC
+ */
+#ifdef CONFIG_X86_IO_APIC 
+	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686,	quirk_via_ioapic },
+#endif
+
 	{ 0 }
 };
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-05-15  1:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-13 17:28 PATCH 2.4.5.1: Fix Via interrupt routing issues Jeff Garzik
2001-05-13 18:38 ` Alan Cox
2001-05-13 18:45   ` Jeff Garzik
2001-05-13 18:47     ` Alan Cox
2001-05-14 15:21 ` Axel Thimm
2001-05-14 16:16   ` Jeff Garzik
2001-05-14 19:05     ` Axel Thimm
2001-05-14 19:14       ` Axel Thimm
2001-05-14 17:07 ` John R Lenton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox