libata: reduce blacklist size (v2)
authorMark Lord <kernel@teksavvy.com>
Thu, 1 Jul 2010 22:17:21 +0000 (18:17 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Sun, 1 Aug 2010 23:36:03 +0000 (19:36 -0400)
Take advantage of the new glob_match() function to reduce the blacklist
size somewhat.  There are further savings possible, but these are
the most obvious biggies.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c

index f8c72a1867fdbfde87e4c6a84bdd922c76b266db..af02ff36cf2b77b9d0576b893cecf8e0636b82f3 100644 (file)
@@ -4211,70 +4211,22 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "OCZ CORE_SSD",       "02.10104",     ATA_HORKAGE_NONCQ },
 
        /* Seagate NCQ + FLUSH CACHE firmware bug */
-       { "ST31500341AS",       "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31500341AS",       "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31500341AS",       "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31500341AS",       "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31500341AS",       "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
-       { "ST31000333AS",       "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST31000333AS",       "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
-       { "ST3640623AS",        "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST3640623AS",        "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
-       { "ST3640323AS",        "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST3640323AS",        "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
-       { "ST3320813AS",        "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST3320813AS",        "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
-       { "ST3320613AS",        "SD15",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "SD16",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "SD17",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "SD18",         ATA_HORKAGE_NONCQ |
-                                               ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "SD19",         ATA_HORKAGE_NONCQ |
+       { "ST3320613AS",        "SD1[56789]",   ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
        /* Blacklist entries taken from Silicon Image 3124/3132