--- linux-2.4.16/arch/i386/kernel/pci-pc.c Fri Nov 9 22:58:02 2001 +++ linux-2.4.16-devel/arch/i386/kernel/pci-pc.c Fri Dec 7 11:00:01 2001 @@ -1109,25 +1109,38 @@ } /* - * Nobody seems to know what this does. Damn. - * - * But it does seem to fix some unspecified problem + * This does seem to fix some unspecified problem * with 'movntq' copies on Athlons. * - * VIA 8363 chipset: - * - bit 7 at offset 0x55: Debug (RW) + * VIA 8361/8363/8662 chipset: + * - bit 7,6,5 at offset 0x55: Debug (RW) */ static void __init pci_fixup_via_athlon_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 */ + if (v & 0xE0) { + printk("PCI: Disabling VIA VT8361/8363/8662 Memory Write Queue\n"); + v &= 0x1f; /* clear bit 55.7, 6, 5 */ pci_write_config_byte(d, 0x55, v); } } +/* + * VIA 8366 chipset: + * - bit 7,6,5 at offset 0x95: Debug (RW) + */ +static void __init pci_fixup_via_kt266_athlon_bug(struct pci_dev *d) +{ + u8 v; + pci_read_config_byte(d, 0x95, &v); + if (v & 0xE0) { + printk("PCI: Disabling VIA VT8366 Memory Write Queue\n"); + v &= 0x1f; /* clear bit 55.7, 6, 5 */ + pci_write_config_byte(d, 0x95, v); + } +} + struct pci_fixup pcibios_fixups[] = { { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx }, @@ -1138,6 +1151,9 @@ { 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_8366_0, pci_fixup_via_kt266_athlon_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8662_0, pci_fixup_via_athlon_bug }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361_0, pci_fixup_via_athlon_bug }, { 0 } }; --- linux-2.4.16/include/linux/pci_ids.h Fri Nov 9 23:11:15 2001 +++ linux-2.4.16-devel/include/linux/pci_ids.h Fri Dec 7 00:25:12 2001 @@ -948,6 +948,9 @@ #define PCI_DEVICE_ID_VIA_8233_0 0x3074 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109 #define PCI_DEVICE_ID_VIA_8633_0 0x3091 +#define PCI_DEVICE_ID_VIA_8366_0 0x3099 +#define PCI_DEVICE_ID_VIA_8662_0 0x3102 +#define PCI_DEVICE_ID_VIA_8361_0 0x3112 #define PCI_DEVICE_ID_VIA_8367_0 0x3099 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 #define PCI_DEVICE_ID_VIA_8231 0x8231