diff options
Diffstat (limited to 'atasmart.c')
-rw-r--r-- | atasmart.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -660,10 +660,12 @@ int sk_disk_smart_status(SkDisk *d, SkBool *good) { if ((ret = disk_command(d, SK_ATA_COMMAND_SMART, SK_DIRECTION_NONE, cmd, NULL, 0)) < 0) return ret; - if (cmd[3] == htons(0x00C2U) && + /* SAT/USB bridges truncate packets, so we only check for 4F, + * not for 2C on those */ + if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x00C2U)) && cmd[4] == htons(0x4F00U)) *good = TRUE; - else if (cmd[3] == htons(0x002CU) && + else if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x002CU)) && cmd[4] == htons(0xF400U)) *good = FALSE; else { |