public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: VIA silent disk corruption - patch
@ 2001-02-06 15:52 Dale Farnsworth
  2001-02-06 16:01 ` Udo A. Steinberg
  2001-02-06 18:17 ` Peter Horton
  0 siblings, 2 replies; 8+ messages in thread
From: Dale Farnsworth @ 2001-02-06 15:52 UTC (permalink / raw)
  To: linux-kernel


In article <20010205190527.A314@colonel-panic.com>,
Peter Horton <pdh@colonel-panic.com> wrote:
> +      *  VIA VT8363 host bridge has broken feature 'PCI Master Read
> +      *  Caching'. It caches more than is good for it, sometimes
> +      *  serving the bus master with stale data. Some BIOSes enable
> +      *  it by default, so we disable it.

Another data point:

I have an ASUS A7V motherboard with via vt82c686a and Promise pdc20265
IDE controllers.  I noticed disk data corruption when I enabled DMA.     
The corrupted data was 4K bytes long on 4K byte boundaries and occurred
about once for every couple of gigabytes copied via cpio.
I saw this corruption when the disks were connected to the pdc20265
as well as to the 686a.    

I also noticed that turning off read caching eliminated the corruption.

However, if I enable the BIOS parameter "I/O Recovery Time", I can still
enable read caching without seeing any data corruption.
The lastest BIOS revision (1005C) enables "I/O Recovery Time" by default
where the previous revision I had (1004D) did not.

-Dale

-- 

Dale Farnsworth         dale@farnsworth.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: VIA silent disk corruption - patch
@ 2001-02-06 19:57 Jonathan Morton
  2001-02-06 20:09 ` Jonathan Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Morton @ 2001-02-06 19:57 UTC (permalink / raw)
  To: Peter Horton, linux-kernel

>I still get corruption with "I/O Recovery Time" enabled :-(
>
>I don't get corruption with the BIOS "normal" settings (1004D).
>
>I might update my BIOS to the latest BIOS in case it changes any other
>settings.

I'm using an Abit KT7 m/board, which uses the same KT133 chipset that I
believe you are all talking about.  Note this is distinct from the KT7-RAID
which has a UDMA-100 RAID chipset on it in addition to the normal IDE
bridge.  I've had no problems with disk corruption, despite turning
everything I dare in the BIOS to "full optimisation" settings - this
includes the "Fast CPU Command Decode" and "Enhance Chipset Performance".

The CPU is a Duron 700MHz, and the drives in question are a Seagate
Barracuda ST310210A on hda and a TEAC CD-540E on hdc.  /sbin/hdparm reports
both drives as NOT using DMA, I might try switching it on and seeing what
happens.

... half an hour later, i actually try it.  Machine appears to be locked
while performing hdparm -t /dev/hda, but waiting to see if it's actually a
timeout.  Performance is abysmal when UDMA is off, incidentally - less than
5Mb/sec from this 7200rpm drive.  The 10,000rpm IBM SCSI drive also in that
machine benchmarks at around 35Mb/sec.

... after about 10 minutes waiting, while adding to this e-mail, the box is
still hung.  Hmph...  *RESET*

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@cyberspace.org  (not for attachments)
big-mail: chromatix@penguinpowered.com
uni-mail: j.d.morton@lancaster.ac.uk

The key to knowledge is not to rely on people to teach you it.

Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/

-----BEGIN GEEK CODE BLOCK-----
Version 3.12
GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS
PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r- y+
-----END GEEK CODE BLOCK-----


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: VIA silent disk corruption - patch
@ 2001-02-05 20:20 Petr Vandrovec
  0 siblings, 0 replies; 8+ messages in thread
From: Petr Vandrovec @ 2001-02-05 20:20 UTC (permalink / raw)
  To: Peter Horton; +Cc: linux-kernel, andre

On  5 Feb 01 at 19:05, Peter Horton wrote:

> Okay, looks like this fixes it (for me anyways).

> +    *  VIA VT8363 host bridge has broken feature 'PCI Master Read
> +    *  Caching'. It caches more than is good for it, sometimes
> +    *  serving the bus master with stale data. Some BIOSes enable
> +    *  it by default, so we disable it.

Hi,
  I'll try it today, though I'm not sure that it will fix lost last
dword on read. But at least it should stop corruption on write...
  After your mail I noticed that there is couple of `unsettable'
options in BIOS, and I did not tried switching BIOS from optimal to
slow setting yet, so maybe there are more broken optimizations?
  I'll keep you informed.
                                    Thanks,
                                        Petr Vandrovec
                                        vandrove@vc.cvut.cz
                                        
                                    
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* VIA silent disk corruption - patch
@ 2001-02-05 19:05 Peter Horton
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Horton @ 2001-02-05 19:05 UTC (permalink / raw)
  To: linux-kernel

Okay, looks like this fixes it (for me anyways).

Thanks to Mark Hahn and Andre for their help with this problem.

P.


--- linux-2.4.1/arch/i386/kernel/pci-pc.c	Thu Jun 22 15:17:16 2000
+++ linux-2.4.1-bm-fix/arch/i386/kernel/pci-pc.c	Mon Feb  5 18:37:35 2001
@@ -924,6 +924,22 @@
 	pcibios_max_latency = 32;
 }
 
+static void __init pci_fixup_vt8363(struct pci_dev *d)
+{
+	/*
+	 *  VIA VT8363 host bridge has broken feature 'PCI Master Read
+	 *  Caching'. It caches more than is good for it, sometimes
+	 *  serving the bus master with stale data. Some BIOSes enable
+	 *  it by default, so we disable it.
+	 */
+	u8 tmp;
+	pci_read_config_byte(d, 0x70, &tmp);
+	if(tmp & 4) {
+		printk("PCI: Bus master read caching disabled\n");
+		pci_write_config_byte(d, 0x70, tmp & ~4);
+	}
+}
+
 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 },
@@ -936,6 +952,7 @@
 	{ PCI_FIXUP_HEADER,	PCI_ANY_ID,		PCI_ANY_ID,			pci_fixup_ide_bases },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5597,		pci_fixup_latency },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5598,		pci_fixup_latency },
+	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	pci_fixup_vt8363 },
 	{ 0 }
 };
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-02-07 23:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-06 15:52 VIA silent disk corruption - patch Dale Farnsworth
2001-02-06 16:01 ` Udo A. Steinberg
2001-02-07 23:19   ` Peter Horton
2001-02-06 18:17 ` Peter Horton
  -- strict thread matches above, loose matches on Subject: below --
2001-02-06 19:57 Jonathan Morton
2001-02-06 20:09 ` Jonathan Morton
2001-02-05 20:20 Petr Vandrovec
2001-02-05 19:05 Peter Horton

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