Blame SOURCES/libatasmart-0.19-wd-fix.patch

434987
Author: Phillip Susi <psusi@ubuntu.com>
434987
Subject: fix an incorrect IO error reading SMART status
434987
Description: The read SMART status command's return status
434987
 was testing for a success/failure value that included 8
434987
 bits that are "N/A" according to the standard, and required
434987
 that they be zeros.  At least some drives do not fill them
434987
 with zeros, so correct this by masking off the undefined
434987
 bits.
434987
434987
Index: b/atasmart.c
434987
===================================================================
434987
--- a/atasmart.c
434987
+++ b/atasmart.c
434987
@@ -925,10 +925,10 @@
434987
         /* SAT/USB bridges truncate packets, so we only check for 4F,
434987
          * not for 2C on those */
434987
         if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x00C2U)) &&
434987
-            cmd[4] == htons(0x4F00U))
434987
+            (cmd[4] & htons(0xFF00U)) == htons(0x4F00U))
434987
                 *good = TRUE;
434987
         else if ((d->type == SK_DISK_TYPE_ATA_PASSTHROUGH_12 || cmd[3] == htons(0x002CU)) &&
434987
-                 cmd[4] == htons(0xF400U))
434987
+                 (cmd[4] & htons(0xFF00U)) == htons(0xF400U))
434987
                 *good = FALSE;
434987
         else {
434987
                 errno = EIO;