Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2009 15:16:15 +0300
From:      Andriy Gapon <avg@freebsd.org>
To:        freebsd-stable@freebsd.org, marck@freebsd.org
Subject:   Re: smartctl: Unrecognized command 13
Message-ID:  <4A6D9A8F.7060507@freebsd.org>
In-Reply-To: <4A6AC6CD.9090005@icyb.net.ua>
References:  <4A6AC6CD.9090005@icyb.net.ua>

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

on 25/07/2009 11:48 Andriy Gapon said the following:
> This is stable/7 i386:
> 
> $ smartctl -t select,568157535-568159000 /dev/ad10
> ...
> Unrecognized command 13 in ata_command_interface()
> Please contact smartmontools-support@lists.sourceforge.net
> Error Write Selective Self-Test Log failed: Function not implemented
> 
> In smartmontools sources this is command WRITE_LOG.
> Is this something that can be patched in smartmontools or does it require
> additional support from ata driver?

I think the patch like the following could do the trick:
--- os_freebsd.cpp.orig	2008-03-05 00:09:47.000000000 +0200
+++ os_freebsd.cpp	2009-07-27 14:02:38.948144118 +0300
@@ -341,6 +340,15 @@
     request.count=512;
     copydata=1;
     break;
+  case WRITE_LOG:
+    memcpy(buff, data, 512);
+    request.u.ata.feature=ATA_SMART_WRITE_LOG_SECTOR;
+    request.u.ata.lba=select|(0xc24f<<8);
+    request.u.ata.count=1;
+    request.flags=ATA_CMD_WRITE;
+    request.data=(char *)buff;
+    request.count=512;
+    break;
   case IDENTIFY:
     request.u.ata.command=ATA_IDENTIFY_DEVICE;
     request.flags=ATA_CMD_READ;

-- 
Andriy Gapon



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