Commit 16c55b03 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: implement BROKEN_HPA horkage and apply it to affected drives

Some drives choke on READ_NATIVE_MAX_ADDRESS[_EXT].  Implement
ATA_HORKAGE_BROKEN_HPA and apply it to affected drives.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 7f9992a2
...@@ -1911,8 +1911,9 @@ int ata_dev_configure(struct ata_device *dev) ...@@ -1911,8 +1911,9 @@ int ata_dev_configure(struct ata_device *dev)
dev->flags |= ATA_DFLAG_FLUSH_EXT; dev->flags |= ATA_DFLAG_FLUSH_EXT;
} }
if (ata_id_hpa_enabled(dev->id)) if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) &&
dev->n_sectors = ata_hpa_resize(dev); ata_id_hpa_enabled(dev->id))
dev->n_sectors = ata_hpa_resize(dev);
/* config NCQ */ /* config NCQ */
ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc)); ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));
...@@ -3795,7 +3796,11 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ...@@ -3795,7 +3796,11 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, },
{ "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, }, { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, },
/* Devices with NCQ limits */ /* devices which puke on READ_NATIVE_MAX */
{ "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
{ "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
{ "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
{ "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
/* End Marker */ /* End Marker */
{ } { }
......
...@@ -303,6 +303,7 @@ enum { ...@@ -303,6 +303,7 @@ enum {
ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */
ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */
}; };
enum hsm_task_states { enum hsm_task_states {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment