public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ServerWorks LE and MTRR
@ 2001-04-29 18:55 Steffen Persvold
  2001-04-29 17:05 ` Gérard Roudier
  2001-04-30  1:06 ` Dave Jones
  0 siblings, 2 replies; 9+ messages in thread
From: Steffen Persvold @ 2001-04-29 18:55 UTC (permalink / raw)
  To: lkml; +Cc: davej, troels

Hi all,

I just compiled 2.4.4 and are running it on a Serverworks LE motherboard.
Whenever I try to add a write-combining region, it gets rejected. I took a peek
in the arch/i386/kernel/mtrr.c and found that this is just as expected with
v1.40 of the code. It is great that the mtrr code checks and prevents the user
from doing something that could eventually lead to data corruption. Using
write-combining on PCI acesses can lead to this on certain LE revisions but
_not_ all (only rev < 5). Therefore please consider my small patch to allow the
good ones to be able to use write-combining. I have several rev 06 and they are
working fine with this patch.

Best regards,
-- 
 Steffen Persvold                        Systems Engineer
 Email  : mailto:sp@scali.com            Scali AS (http://www.scali.com)
 Norway : Tel  : (+47) 2262 8950         Olaf Helsets vei 6
          Fax  : (+47) 2262 8951         N-0621 Oslo, Norway

 USA    : Tel  : (+1) 713 706 0544       10500 Richmond Avenue, Suite 190
                                         Houston, Texas 77042, USA

diff -Nur linux/arch/i386/kernel/mtrr.c.~1~ linux/arch/i386/kernel/mtrr.c
--- linux/arch/i386/kernel/mtrr.c.~1~	Wed Apr 11 21:02:27 2001
+++ linux/arch/i386/kernel/mtrr.c	Sun Apr 29 10:18:06 2001
@@ -480,6 +480,7 @@
 {
     unsigned long config, dummy;
     struct pci_dev *dev = NULL;
+    u8 rev;
     
    /* ServerWorks LE chipsets have problems with  write-combining 
       Don't allow it and  leave room for other chipsets to be tagged */
@@ -489,7 +490,9 @@
         case PCI_VENDOR_ID_SERVERWORKS:
  	    switch (dev->device) {
 	    case PCI_DEVICE_ID_SERVERWORKS_LE:
-		return 0;
+		pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev);
+		if (rev <= 5)
+		    return 0;
 		break;
 	    default:
 		break;

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: ServerWorks LE and MTRR
@ 2001-04-30 13:44 Mark_Rusk
  0 siblings, 0 replies; 9+ messages in thread
From: Mark_Rusk @ 2001-04-30 13:44 UTC (permalink / raw)
  To: linux-kernel

I had sent the original patch to Alan back in the Feb. to correct problems
with XFree 4.0.2 and LE chipsets.  I will check that the problem is
corrected with Rev's >5. We would see complete system lockups when the Xfree
server would use write-combining mtrr segments. 

-----Original Message-----
From: Dave Jones [mailto:davej@suse.de]
Sent: Sunday, April 29, 2001 8:06 PM
To: Steffen Persvold
Cc: lkml; troels@thule.no
Subject: Re: ServerWorks LE and MTRR


On Sun, 29 Apr 2001, Steffen Persvold wrote:

> ...
> Therefore please consider my small patch to allow the
> good ones to be able to use write-combining. I have several rev 06 and
they are
> working fine with this patch.
> ...

ObPedant:
 Can you make a note of this in the comment a few lines above also,
so others who stumble across this code know why the check is there.
afaik, this chipset info isn't public, so it may not be obvious
in the future why the check has been added.

Just something simple like..

-    /* ServerWorks LE chipsets have problems with  write-combining
+    /* ServerWorks LE chipsets < rev 6 have problems with write-combining
       Don't allow it and  leave room for other chipsets to be tagged */


Otherwise, if this works for everyone else with rev 6+ serverworks
chipsets, looks ok to me.

regards,

Dave.

-- 
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs

-
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/


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

end of thread, other threads:[~2001-04-30 13:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-29 18:55 ServerWorks LE and MTRR Steffen Persvold
2001-04-29 17:05 ` Gérard Roudier
2001-04-29 21:05   ` Steffen Persvold
2001-04-29 22:14     ` nick
2001-04-29 22:39       ` Steffen Persvold
2001-04-30  3:35         ` Gérard Roudier
2001-04-30  8:55         ` Eric W. Biederman
2001-04-30  1:06 ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2001-04-30 13:44 Mark_Rusk

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