Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2004 23:45:06 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        "Tim Welch" <freebsd-stable@thepentagon.org>, freebsd-stable@freebsd.org
Cc:        =?iso-8859-1?Q?S=F8ren_Schmidt?= <sos@DeepCore.dk>
Subject:   Re: DMA errors with SATA on 5.x  [one fix]
Message-ID:  <p0620075ebddd86599603@[128.113.24.47]>
In-Reply-To: <55368.65.7.255.129.1102402914.squirrel@65.7.255.129>
References:  <55368.65.7.255.129.1102402914.squirrel@65.7.255.129>

next in thread | previous in thread | raw e-mail | index | archive | help
At 1:01 AM -0600 12/7/04, Tim Welch wrote:
>I'm getting NID not found/DMA errors on 5-STABLE with a Seagate 200gb
>sata drive:
>
>    ad2: FAILURE - WRITE_DMA status=51<READY,DSC,ERROR>
>    error=10<NID_NOT_FOUND> LBA=268435455
>
>This appears to be a result of 48-bit addressing. Any time a write is
>attempted to the sector above, I get multiple messages like this. It
>continues until I shut down. After a bit of googling I found this post:
>
>http://lists.freebsd.org/pipermail/freebsd-hackers/2004-October/008821.html
>
>and applied the change suggested. It seems to have fixed the problem,
>and I've had no troubles from this since Nov. 18th when I applied that
>patch.  I'm running an Intel 875PBZ board with the ich5 controller.
>The drive in question is a Seagate ST3200822AS/3.01 (as reported by
>dmesg). So the question is, will this patch be committed anytime soon?

That looks like a pretty safe patch to make.  The message says he
just reduced the 48-bit trigger level by one:

--- ata-lowlevel.c.orig Wed Nov 24 05:47:26 2004
+++ ata-lowlevel.c      Wed Dec  8 22:45:39 2004
@@ -701,7 +701,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 */

If this fixes a problem with large disks for both the original
person and for you, then I suspect we should commit it.  I don't
know if we need to add a comment saying why we're going with
268435454 instead of 268435455, though.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



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