From owner-freebsd-stable@FreeBSD.ORG Mon Jul 27 12:16:19 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2BC1065670 for ; Mon, 27 Jul 2009 12:16:19 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BD8788FC19 for ; Mon, 27 Jul 2009 12:16:18 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA07228; Mon, 27 Jul 2009 15:16:16 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4A6D9A8F.7060507@freebsd.org> Date: Mon, 27 Jul 2009 15:16:15 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090630) MIME-Version: 1.0 To: freebsd-stable@freebsd.org, marck@freebsd.org References: <4A6AC6CD.9090005@icyb.net.ua> In-Reply-To: <4A6AC6CD.9090005@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: smartctl: Unrecognized command 13 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 12:16:20 -0000 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