Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2004 12:17:35 +0100 (BST)
From:      Neil Hoggarth <neil.hoggarth@physiol.ox.ac.uk>
To:        freebsd-hackers@freebsd.org
Cc:        =?iso-8859-1?Q?S=F8ren_Schmidt?= <sos@DeepCore.dk>
Subject:   Re: ad0: FAILURE - WRITE_DMA
Message-ID:  <Pine.GSO.4.58.0410291146060.29645@saros.physiol>
In-Reply-To: <4168F9E7.9040408@DeepCore.dk>
References:  <200410081937.15068.miha@ghuug.org> <41682D3F.4060902@DeepCore.dk> <200410091843.06854.miha@ghuug.org> <4168F9E7.9040408@DeepCore.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8th October, Mikhail P. <miha@ghuug.org> reported the error:

ad0: FAILURE - WRITE_DMA status=3D51<READY,DSC,ERROR> error=3D10<NID_NOT_FO=
UND> LBA=3D268435455

On Sun, 10 Oct 2004, S=F8ren Schmidt wrote:

> so that leaves the disks for scrutiny. One thing to try is change the
> tripping point where we switch from 28bit mode to 48 bit mode, could be
> a 1 off error in the firmware...

This sounds very possible to me. I have been experiencing the same
error, on a system that I've been trying to set up using 5.3-RC1 and
a new 160Gbyte SATA drives My hardware is:

atapci0: <SiI 3112 SATA150 controller> port 0xb000-0xb00f,0xac00-0xac03,0xa=
800-0xa807,0xa400-0xa403,0xa000-0xa007 mem 0xdf081000-0xdf0811ff irq 18 at =
device 11.0 on pci1
ad4: 152627MB <ST3160023AS/3.18> [310101/16/63] at ata2-master SATA150

(I notice that Michail and I both have Seagate drives ...).

I had problems with a filesystem on a partition which crossed the
LBA=3D268435455 threshold. After googling and reading this thread and
S=F8ren's posting, I tried removing the filesystem and making a little
1000 sector partition which straddled the lba48 transition sector - I was
able to get read and write failure messages of the above form
reproducibly, by dd-ing between the test partition and /dev/zero.

I edited the /usr/src/sys/dev/ata/ata-lowlevel.c file and reduced the
48-bit trigger level by one:

--- ata-lowlevel.c.orig Fri Oct 29 12:06:09 2004
+++ ata-lowlevel.c      Fri Oct 29 12:05:38 2004
@@ -700,7 +700,7 @@
     ATA_IDX_OUTB(atadev->channel, ATA_ALTSTAT, ATA_A_4BIT);

     /* only use 48bit addressing if needed (avoid bugs and overhead) */
-    if ((lba > 268435455 || count > 256) && atadev->param &&
+    if ((lba > 268435454 || count > 256) && atadev->param &&
        atadev->param->support.command2 & ATA_SUPPORT_ADDRESS48) {

        /* translate command into 48bit version */

and built a new kernel (I'm using the stock GENERIC configuration).

The resulting kernel was able to dd to and from the test partition
without error. I've now created a new filesystem that uses this part
of the disk and restored the contents from backup, and have been
actively using the filesystem for the last day without observing any
further problems.

Regards,
--=20
Neil Hoggarth                                Departmental Computing Manager
<neil.hoggarth@physiol.ox.ac.uk>                   Laboratory of Physiology
http://www.physiol.ox.ac.uk/~njh/                  University of Oxford, UK



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