[PATCH] VIA IRQ quirk fixup only in XT_PIC mode Take 2

From: Sergio Monteiro Basto
Date: Fri Jul 28 2006 - 08:58:57 EST


Hi, this patch (now for 2.6.18-rc2) is more readable.

Thanks,
--
SÃrgio M. B.

Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Cc: "Scott J. Harmon" <harmon@xxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxx>
Cc: Chris Wedgwood <cw@xxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Sergio Monteiro Basto <sergio@xxxxxxxxxxxxxxxxxx>
---
quirks.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

--- linux-2.6.17.i686/drivers/pci/quirks.c.orig 2006-07-28 12:59:04.000000000 +0100
+++ linux-2.6.17.i686/drivers/pci/quirks.c 2006-07-28 13:26:49.000000000 +0100
@@ -648,11 +648,17 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V
*
* Some of the on-chip devices are actually '586 devices' so they are
* listed here.
+ *
+ * if flags say that we have working apic(s), we don't need to quirk these
+ * devices
*/
static void quirk_via_irq(struct pci_dev *dev)
{
u8 irq, new_irq;

+ if ((smp_found_config && !skip_ioapic_setup && nr_ioapics) || cpu_has_apic)
+ return;
+
new_irq = dev->irq & 0xf;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
if (new_irq != irq) {
@@ -662,13 +668,7 @@ static void quirk_via_irq(struct pci_dev
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
}
}
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);

/*
* VIA VT82C598 has its device ID settable and many BIOSes




-
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/