Tighten up serverworks workaround.

From: davej@codemonkey.org.uk
Date: Wed Feb 26 2003 - 08:49:00 EST


Aparently on rev6 of the LE and above, this workaround
isn't needed. Lets give it a try, and see what happens.

    Dave

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/cpu/mtrr/main.c linux-2.5/arch/i386/kernel/cpu/mtrr/main.c
--- bk-linus/arch/i386/kernel/cpu/mtrr/main.c 2003-02-25 13:10:08.000000000 -0100
+++ linux-2.5/arch/i386/kernel/cpu/mtrr/main.c 2003-02-24 16:36:06.000000000 -0100
@@ -75,20 +75,24 @@ void set_mtrr_ops(struct mtrr_ops * ops)
 static int have_wrcomb(void)
 {
         struct pci_dev *dev = NULL;
-
- /* WTF is this?
- * Someone, please shoot me.
- */
-
- /* ServerWorks LE chipsets have problems with write-combining
- Don't allow it and leave room for other chipsets to be tagged */
+ u8 rev;
 
         if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) {
                 if ((dev->vendor == PCI_VENDOR_ID_SERVERWORKS) &&
                     (dev->device == PCI_DEVICE_ID_SERVERWORKS_LE)) {
- printk(KERN_INFO
- "mtrr: Serverworks LE detected. Write-combining disabled.\n");
- return 0;
+
+ /* ServerWorks LE chipsets have problems with write-combining
+ Don't allow it and leave room for other chipsets to be tagged.
+ Rumour has it that rev6 and above are ok. */
+ pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);
+ if (rev > 5) {
+ printk ("mtrr: Serverworks LE rev %d detected. Earlier versions of this chipset had mtrr bugs\n", rev);
+ printk ("mtrr: Please send mail to linux-kernel@vger.kernel.org if this seems stable.\n");
+ return 1;
+ } else {
+ printk(KERN_INFO "mtrr: Serverworks LE detected. Write-combining disabled.\n");
+ return 0;
+ }
                 }
         }
         return (mtrr_if->have_wrcomb ? mtrr_if->have_wrcomb() : 0);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 22:00:35 EST