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 [email protected]
> 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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"

Reply via email to