misc/89885: Writing to S-ATA HDD in DMA mode fails

Pål Marius Bjørnstad pmbjornstad at gmail.com
Sat Dec 3 15:00:17 GMT 2005


>Number:         89885
>Category:       misc
>Synopsis:       Writing to S-ATA HDD in DMA mode fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 03 15:00:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Pål Marius Bjørnstad
>Release:        6.0-RELEASE
>Organization:
Private
>Environment:
FreeBSD fa2k.fa2001.mine.nu 6.0-STABLE FreeBSD 6.0-STABLE #2: Sat Dec  3 00:35:40 CET 2005     root at fa2k.fa2001.mine.nu:/usr/obj/usr/src/sys/BLACKHOLE  i386

>Description:
This bug /may/ be the result of a slightly "unstable" system. I have to disable the APIC for the system to stay up more than 2-5 minutes. When doing that, the computer seems stable, it can run for 12 hours, with no weird messages in the console, except, of course the following problem. If no-one else are experiencing this, it's obvious that this bug should be ignored.

When I try to mount the Serial ATA disk, the following messages appear in the console:
ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=12063
ad4: TIMEOUT - WRITE_DMA retrying (0 retries left) LBA=12063
ad4: FAILURE - WRITE_DMA timed out LBA=12063
g_vfs_done():ad4s1d[WRITE(offset=6144000, length=8192)]error = 5
ad4: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=12063
ad4: TIMEOUT - WRITE_DMA retrying (0 retries left) LBA=12063
ad4: FAILURE - WRITE_DMA timed out LBA=12063
g_vfs_done():ad4s1d[WRITE(offset=6144000, length=8192)]error = 5

The S-ATA controller is located on the motherboard. It is an Asus A7N8X. Output of pciconf -lv for the S-ATA controller:
hdr=0x00
    vendor   = 'Silicon Image Inc (Was: CMD Technology Inc)'
    device   = 'SiI 3112 SATALink/SATARaid Controller'
    class    = mass storage
    subclass = RAID

It is possible to view the files on the filesystem, and to write to it when it is mounted this way, but I suspect that data is lost, or will be lost, if it is used extensively. When setting the drive to PIO4-mode using atacontrol, the errors do not appear, and everything works as expected. When mounting in read-only mode, it can read flawlessly (with DMA enabled).

The hard drive is a Seagate, with 80GB:
ATA channel 2:
    Master:  ad4 <ST380023AS/3.01> ATA/ATAPI revision 6
    Slave:       no device present

I have CVSup'ed to the most recent version of RELEASE-6.0. The problem did not occur on Windows, so it's not an (obvious) case of broken hardware. ACPI disable/enable changes nothing.
>How-To-Repeat:
With the described hardware, the problem appears once one tries to use the drive.
>Fix:
              
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list