[PATCH] Backport Via IRQ mask fix

From: Herbert Xu
Date: Mon Oct 04 2004 - 23:08:30 EST


Hi Marcelo:

Here is a backport of the Via APIC IRQ mask fix that Al Viro made to 2.6.
This is his original description:

# ChangeSet
# 2004/06/23 10:55:18-07:00 viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# [PATCH] bug in V-link handling (arch/i386/pci/irq.c)
#
# Via southbridges use register 0x3c of the on-board devices (USB and
# AC97) to control interrupt routing for those. In drivers/pci/quirks.c we
# set it correctly (dev->irq & 15). However, in pirq_enable_irq() where the
# second half of that stuff lives, we forget to apply the mask.
#
# That's what causes problems with ioapic on via motherboards in 2.6.
# One-liner below ACKed by Alan, verified on via-based boxen here, obviously
# doesn't affect non-via ones (we only set interrupt_line_quirk for via
# chipsets).

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
===== arch/i386/kernel/pci-irq.c 1.29 vs edited =====
--- 1.29/arch/i386/kernel/pci-irq.c 2004-08-24 08:01:27 +10:00
+++ edited/arch/i386/kernel/pci-irq.c 2004-10-05 14:03:34 +10:00
@@ -1129,6 +1129,6 @@
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
else if (interrupt_line_quirk)
- pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);

}