In particular if it is implemented, all the smart commands used in libatasmart are prohibited.
The IDENTIFY DEVICE command, if is implemented "PACKET Command feature set", shall return command aborted, but in libatasmart the return value is lost and the "d->identify_valid = FALSE;" is never setted.
Try to add in function disk_identify_device(),
after (line 741) "if ((ret = disk_command(d, SK_ATA_COMMAND_IDENTIFY_DEVICE, SK_DIRECTION_IN, cmd, d->identify, &len)) < 0)"
and before (line 742)"return ret;"
"d->identify_valid = FALSE;"
HI, sorry for my bad english.
I don't have sdd hard disk, but I've watched libatasmart code for other bug and I think that I can help a little for this
In the attachment smartctl-output I can see: "ATA Version is: 5"
In this pdf (2.7MB) http:// www.t10. org/t13/ project/ d1321r3- ATA-ATAPI- 5.pdf there are differences if hdd implements "PACKET Command feature set" or no.
In particular if it is implemented, all the smart commands used in libatasmart are prohibited.
The IDENTIFY DEVICE command, if is implemented "PACKET Command feature set", shall return command aborted, but in libatasmart the return value is lost and the "d->identify_valid = FALSE;" is never setted.
Try to add in function disk_identify_ device( ), COMMAND_ IDENTIFY_ DEVICE, SK_DIRECTION_IN, cmd, d->identify, &len)) < 0)"
after (line 741) "if ((ret = disk_command(d, SK_ATA_
and before (line 742)"return ret;"
"d->identify_valid = FALSE;"
like this
if ((ret = disk_command(d, SK_ATA_ COMMAND_ IDENTIFY_ DEVICE, SK_DIRECTION_IN, cmd, d->identify, &len)) < 0) {
d->identify_ valid = FALSE;
return ret;
}