The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Simplify serverworks workaround.
@ 2001-10-24 17:55 Dave Jones
  2001-10-24 18:22 ` EvilTypeGuy
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2001-10-24 17:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel, rgooch

Linus, Richard,
 Patch below makes the workaround for Serverworks LE chipsets
 a little simpler, and also adds a printk to let people know
 why they can't use Write-combining.

regards,

Dave.


diff -urN --exclude-from=/home/davej/.exclude linux/arch/i386/kernel/mtrr.c ../2.5/linux-dj/arch/i386/kernel/mtrr.c
--- linux/arch/i386/kernel/mtrr.c	Fri Oct 12 16:29:57 2001
+++ linux-dj/arch/i386/kernel/mtrr.c	Sat Oct 13 12:08:34 2001
@@ -473,25 +473,16 @@
     unsigned long config, dummy;
     struct pci_dev *dev = NULL;
     
-   /* ServerWorks LE chipsets have problems with  write-combining 
-      Don't allow it and  leave room for other chipsets to be tagged */
+   /* ServerWorks LE chipsets have problems with write-combining 
+      Don't allow it and leave room for other chipsets to be tagged */
 
-    if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) {
-	switch(dev->vendor) {
-        case PCI_VENDOR_ID_SERVERWORKS:
- 	    switch (dev->device) {
-	    case PCI_DEVICE_ID_SERVERWORKS_LE:
+	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;
-		break;
-	    default:
-		break;
-	    }
-	    break;
-	default:
-	    break;
+		}
 	}
-    }
-
 
     switch ( mtrr_if )
     {


-- 
| Dave Jones.                    http://www.codemonkey.org.uk
| SuSE Labs .

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-24 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-24 17:55 [PATCH] Simplify serverworks workaround Dave Jones
2001-10-24 18:22 ` EvilTypeGuy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox