Re: VIA KT133A / athlon / MMX

Kurt Garloff
2001-07-30T18:45:04Z

[-- Attachment #1.1: Type: text/plain, Size: 689 bytes --]

Hi,

OK, patches for different bits are attached.
The patch does modify up to 4 bits, which is more than I would like to do in
the end. But you can easily disable some parts of it, if the full patch
proves to solve your trouble.
Please test!

It seemed to solved the trouble here on first sight (booting went further
then normal) but in the end did not turn out to solve the trouble here.
(Here means: MSI K7T Turbo (Ver.3) with AMD K7 1.2GHz.)

Regards,
--
Kurt Garloff <garloff@suse.de> Eindhoven, NL
GPG key: See mail header, key servers Linux kernel development
SuSE GmbH, Nuernberg, DE SCSI, Security

[-- Attachment #1.2: 247-viakt133.diff --]
[-- Type: text/plain, Size: 2250 bytes --]

--- linux-2.4.7.compile/drivers/pci/quirks.c.orig Tue Jul 24 16:50:41 2001
+++ linux-2.4.7.compile/drivers/pci/quirks.c Mon Jul 30 20:21:56 2001
@@ -160,6 +160,49 @@
}

/*
+ * KT133a will fsck up under some circumstances if Burst Refresh (4 times)
+ * is enabled or if data latch delay is disabled
+ * and we use the fast streaming K7 optimized zero_page
+ * and copy_page routines from arch/i386/lib/mmx.c
+ * -- garloff@suse.de, 2001-07-30
+ */
+static void __init quirk_via_noburstrefresh(struct pci_dev *dev)
+{
+ u8 dram_ctrl;
+ pci_read_config_byte(dev, 0x68, &dram_ctrl);
+ if (dram_ctrl & 0x04 || !(dram_ctrl & 0x10)) {
+ if (dram_ctrl & 0x04)
+ printk(KERN_INFO "VIA KT133a: Disabling burst refresh.\n");
+ dram_ctrl &= ~0x04;
+ if (!(dram_ctrl & 0x10))
+ printk(KERN_INFO "VIA KT133a: Enabling data latch delay.\n");
+ dram_ctrl |= 0x10;
+ pci_write_config_byte(dev, 0x68, dram_ctrl);
+ }
+}
+
+/*
+ * KT133a will fsck up under some circumstances if Probe Next Tag State
+ * T1 is set to 1 and we use the fast streaming K7 optimized zero_page
+ * and copy_page routines from arch/i386/lib/mmx.c
+ * -- garloff@suse.de, 2001-07-30
+ */
+static void __init quirk_via_noprobenexttag(struct pci_dev *dev)
+{
+ u8 biu_ctrl;
+ pci_read_config_byte(dev, 0x54, &biu_ctrl);
+ if (biu_ctrl & 0x40 || biu_ctrl & 0x01) {
+ if (biu_ctrl & 0x40)
+ printk(KERN_INFO "VIA KT133a: Disabling probe next tag state T1.\n");
+ if (biu_ctrl & 0x01)
+ printk(KERN_INFO "VIA KT133a: Disabling fast write-to-read.\n");
+ biu_ctrl &= ~0x41;
+ pci_write_config_byte(dev, 0x54, biu_ctrl);
+ }
+}
+
+
+/*
* Natoma has some interesting boundary conditions with Zoran stuff
* at least
*/
@@ -452,6 +495,9 @@
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic },
+
+ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_via_noburstrefresh },
+ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_via_noprobenexttag },

{ 0 }
};

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]