diff -u -r vanilla/arch/i386/kernel/pci-pc.c patched/arch/i386/kernel/pci-pc.c --- vanilla/arch/i386/kernel/pci-pc.c Fri Dec 21 12:41:53 2001 +++ patched/arch/i386/kernel/pci-pc.c Sat Dec 22 08:24:44 2001 @@ -1109,22 +1109,29 @@ } /* - * Nobody seems to know what this does. Damn. + * Addresses issues with problems in the memory write queue timer in + * certain VIA Northbridges. This bugfix is per VIA's specifications. * - * But it does seem to fix some unspecified problem - * with 'movntq' copies on Athlons. - * - * VIA 8363 chipset: - * - bit 7 at offset 0x55: Debug (RW) + * VIA 8363,8622,8361 Northbridges: + * - bits 5, 6, 7 at offset 0x55 need to be turned off + * VIA 8367 (KT266x) Northbridges: + * - bits 5, 6, 7 at offset 0x95 need to be turned off */ -static void __init pci_fixup_via_athlon_bug(struct pci_dev *d) +static void __init pci_fixup_via_northbridge_bug(struct pci_dev *d) { u8 v; - pci_read_config_byte(d, 0x55, &v); - if (v & 0x80) { - printk("Trying to stomp on Athlon bug...\n"); - v &= 0x7f; /* clear bit 55.7 */ - pci_write_config_byte(d, 0x55, v); + int where = 0x55; + + if (d->device == PCI_DEVICE_ID_VIA_8367_0) { + where = 0x95; /* the memory write queue timer register is + different for the kt266x's: 0x95 not 0x55 */ + } + + pci_read_config_byte(d, where, &v); + if (v & 0xe0) { + printk("Trying to stomp on VIA Northbridge bug...\n"); + v &= 0x1f; /* clear bits 5, 6, 7 */ + pci_write_config_byte(d, where, v); } } @@ -1137,7 +1144,10 @@ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci_fixup_piix4_acpi }, - { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_athlon_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug }, { 0 } }; diff -u -r vanilla/include/linux/pci_ids.h patched/include/linux/pci_ids.h --- vanilla/include/linux/pci_ids.h Fri Dec 21 12:42:03 2001 +++ patched/include/linux/pci_ids.h Sat Dec 22 08:16:55 2001 @@ -946,7 +946,9 @@ #define PCI_DEVICE_ID_VIA_8233_7 0x3065 #define PCI_DEVICE_ID_VIA_82C686_6 0x3068 #define PCI_DEVICE_ID_VIA_8233_0 0x3074 +#define PCI_DEVICE_ID_VIA_8622 0x3102 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109 +#define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_8633_0 0x3091 #define PCI_DEVICE_ID_VIA_8367_0 0x3099 #define PCI_DEVICE_ID_VIA_86C100A 0x6100