]> git.ipfire.org Git - people/ms/linux.git/commitdiff
libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
authorTejun Heo <tj@kernel.org>
Thu, 27 Nov 2008 04:36:48 +0000 (13:36 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:22 +0000 (10:55 -0800)
commit ac70a964b0e22a95af3628c344815857a01461b7 upstream.

Some recent Seagate harddrives have firmware bug which causes FLUSH
CACHE to timeout under certain circumstances if NCQ is being used.
This can be worked around by disabling NCQ and fixed by updating the
firmware.  Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
devices.

The wiki page has been updated to contain information on this issue.

  http://ata.wiki.kernel.org/index.php/Known_issues

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/libata-core.c
include/linux/libata.h

index 98ccc22e2f1c471e46b9f710e55d3b463c31d72e..b551cda80db558c8bedd7a30052c3346bd3805f6 100644 (file)
@@ -2428,6 +2428,13 @@ int ata_dev_configure(struct ata_device *dev)
                }
        }
 
+       if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
+               ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires "
+                              "firmware update to be fully functional.\n");
+               ata_dev_printk(dev, KERN_WARNING, "         contact the vendor "
+                              "or visit http://ata.wiki.kernel.org.\n");
+       }
+
        return 0;
 
 err_out_nosup:
@@ -3971,6 +3978,20 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "ST380817AS",         "3.42",         ATA_HORKAGE_NONCQ },
        { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
 
+       /* Seagate NCQ + FLUSH CACHE firmware bug */
+       { "ST31500341AS",       "9JU138",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "9FZ136",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "9FZ164",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "9FZ134",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "9FZ182",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "9FZ162",       ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
        /* Blacklist entries taken from Silicon Image 3124/3132
           Windows driver .inf file - also several Linux problem reports */
        { "HTS541060G9SA00",    "MB3OC60D",     ATA_HORKAGE_NONCQ, },
index 225bfc5bd9ec1eb43b143d059f926918a30c2656..25062ac24f059ce80af4160023bf969e8ef00559 100644 (file)
@@ -364,6 +364,7 @@ enum {
        ATA_HORKAGE_IPM         = (1 << 7),     /* Link PM problems */
        ATA_HORKAGE_IVB         = (1 << 8),     /* cbl det validity bit bugs */
        ATA_HORKAGE_STUCK_ERR   = (1 << 9),     /* stuck ERR on next PACKET */
+       ATA_HORKAGE_FIRMWARE_WARN = (1 << 12),  /* firwmare update warning */
 
         /* DMA mask for user DMA control: User visible values; DO NOT
            renumber */