Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2006 10:07:51 +0930 (CST)
From:      Phil Kernick <philk@rotfl.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/97996: DMA is broken for VIA 82C596B UDMA66controller
Message-ID:  <20060527003751.83E921CD91@mail.rotfl.com.au>
Resent-Message-ID: <200605270040.k4R0eGZ8094846@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         97996
>Category:       i386
>Synopsis:       DMA is broken for VIA 82C596B UDMA66controller
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 27 00:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Phil Kernick
>Release:        FreeBSD 5.5-BETA4 i386
>Organization:
>Environment:
System: FreeBSD catbert.rotfl.com.au 5.5-BETA4 FreeBSD 5.5-BETA4 #1: Wed Apr 19 16:29:31 CST 2006 root@catbert.rotfl.com.au:/usr/src/sys/i386/compile/CATBERT i386

$ dmesg | grep ata
atapci0: <VIA 82C596B UDMA66 controller> port
0xc000-0xc00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 7.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
atapci1: <HighPoint HPT370 UDMA100 controller> port
0xe800-0xe8ff,0xe400-0xe403,0xe000-0xe007,0xdc00-0xdc03,0xd800-0xd807 irq 10
at device 11.0 on pci0
ata2: channel #0 on atapci1
ata3: channel #1 on atapci1
ad0: 76319MB <ST380011A/3.06> [155061/16/63] at ata0-master PIO4
acd0: DVDROM <LITE-ON DVD SOHD-16P9S/FS07> at ata1-master PIO4
ad3: 114473MB <ST3120026A/8.01> [232581/16/63] at ata1-slave PIO4
ad4: 152627MB <ST3160023A/8.01> [310101/16/63] at ata2-master PIO4
ad6: 152627MB <ST3160023A/3.06> [310101/16/63] at ata3-master PIO4
 disk0 READY on ad4 at ata2-master
 disk1 READY on ad6 at ata3-master
cd0 at ata1 bus 0 target 0 lun 0

>Description:
I have been having repeated filesystem corruption issues on 5.4 and 5.5-beta4.

The problems only occur on disks connected to the VIA 82C596B UDMA66
controller.  There have been no problems at all with the HighPoint controller.

I have replaced the disk, motherboard, cables, ram and everything else but
the problem does not go away.  The one commonality is FreeBSD.

I first noticed the problem when a moved from 4.11 to 5.4, and upgrading to
5.5-beta didn't fix the problem.

Looking through the stable archives this was reported last year but there
does not seem to be any resolution of the problem.

Since it is limited to a specific controller, and is definitely DMA related,
I assume that it is a bug in the controller handling code, but I don't know
how to track it down.

>How-To-Repeat:
The problems only occur under heavy load with lots of reads and writes, such
as a snapshot dump on a live filesystem or a large port compile.

>Fix:
Adding these lines to loader.conf completely solves the corruption problem:
$ grep ata /boot/loader.conf
hw.ata.wc=0
hw.ata.ata_dma=0

Unfortunately it also slows disk IO to 20% of previous and loads CPU with
interrupt waits all the time.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060527003751.83E921CD91>