libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ

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>

authored by Tejun Heo and committed by Jeff Garzik ac70a964 03f60840

+22
+21
drivers/ata/libata-core.c
··· 2492 } 2493 } 2494 2495 return 0; 2496 2497 err_out_nosup: ··· 4048 { "Maxtor 7V300F0", "VA111630", ATA_HORKAGE_NONCQ }, 4049 { "ST380817AS", "3.42", ATA_HORKAGE_NONCQ }, 4050 { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, 4051 4052 /* Blacklist entries taken from Silicon Image 3124/3132 4053 Windows driver .inf file - also several Linux problem reports */
··· 2492 } 2493 } 2494 2495 + if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) { 2496 + ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires " 2497 + "firmware update to be fully functional.\n"); 2498 + ata_dev_printk(dev, KERN_WARNING, " contact the vendor " 2499 + "or visit http://ata.wiki.kernel.org.\n"); 2500 + } 2501 + 2502 return 0; 2503 2504 err_out_nosup: ··· 4041 { "Maxtor 7V300F0", "VA111630", ATA_HORKAGE_NONCQ }, 4042 { "ST380817AS", "3.42", ATA_HORKAGE_NONCQ }, 4043 { "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ }, 4044 + 4045 + /* Seagate NCQ + FLUSH CACHE firmware bug */ 4046 + { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ | 4047 + ATA_HORKAGE_FIRMWARE_WARN }, 4048 + { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ | 4049 + ATA_HORKAGE_FIRMWARE_WARN }, 4050 + { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ | 4051 + ATA_HORKAGE_FIRMWARE_WARN }, 4052 + { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ | 4053 + ATA_HORKAGE_FIRMWARE_WARN }, 4054 + { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ | 4055 + ATA_HORKAGE_FIRMWARE_WARN }, 4056 + { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ | 4057 + ATA_HORKAGE_FIRMWARE_WARN }, 4058 4059 /* Blacklist entries taken from Silicon Image 3124/3132 4060 Windows driver .inf file - also several Linux problem reports */
+1
include/linux/libata.h
··· 375 ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ 376 ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands 377 not multiple of 16 bytes */ 378 379 /* DMA mask for user DMA control: User visible values; DO NOT 380 renumber */
··· 375 ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ 376 ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands 377 not multiple of 16 bytes */ 378 + ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ 379 380 /* DMA mask for user DMA control: User visible values; DO NOT 381 renumber */