smartctl: Unrecognized command 13

Dmitry Morozovsky marck at FreeBSD.org
Mon Jul 27 19:10:59 UTC 2009


On Mon, 27 Jul 2009, Andriy Gapon wrote:

AG> > $ smartctl -t select,568157535-568159000 /dev/ad10
AG> > ...
AG> > Unrecognized command 13 in ata_command_interface()
AG> > Please contact smartmontools-support at lists.sourceforge.net
AG> > Error Write Selective Self-Test Log failed: Function not implemented
AG> > 
AG> > In smartmontools sources this is command WRITE_LOG.
AG> > Is this something that can be patched in smartmontools or does it require
AG> > additional support from ata driver?
AG> 
AG> I think the patch like the following could do the trick:
AG> --- os_freebsd.cpp.orig	2008-03-05 00:09:47.000000000 +0200
AG> +++ os_freebsd.cpp	2009-07-27 14:02:38.948144118 +0300
AG> @@ -341,6 +340,15 @@
AG>      request.count=512;
AG>      copydata=1;
AG>      break;
AG> +  case WRITE_LOG:
AG> +    memcpy(buff, data, 512);
AG> +    request.u.ata.feature=ATA_SMART_WRITE_LOG_SECTOR;
AG> +    request.u.ata.lba=select|(0xc24f<<8);
AG> +    request.u.ata.count=1;
AG> +    request.flags=ATA_CMD_WRITE;
AG> +    request.data=(char *)buff;
AG> +    request.count=512;
AG> +    break;
AG>    case IDENTIFY:
AG>      request.u.ata.command=ATA_IDENTIFY_DEVICE;
AG>      request.flags=ATA_CMD_READ;

Thank you, PR 137177 created.

-- 
Sincerely,
D.Marck                                        [DM5020, MCK-RIPE, DM3-RIPN]
---------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at FreeBSD.org ***
---------------------------------------------------------------------------


More information about the freebsd-stable mailing list