diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-28 22:58:33 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-08-31 04:21:13 -0400 |
commit | 16c55b038033d8f6f7601996dfae44399666d9ab (patch) | |
tree | 22fb45fb599455cadc29b0f8ac18dd4695eae8b5 | |
parent | 7f9992a23190418592f0810900e4f91546ec41da (diff) |
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: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/libata-core.c | 11 | ||||
-rw-r--r-- | include/linux/libata.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9cf46bf8c8d2..a3ee087223de 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1911,8 +1911,9 @@ int ata_dev_configure(struct ata_device *dev) | |||
1911 | dev->flags |= ATA_DFLAG_FLUSH_EXT; | 1911 | dev->flags |= ATA_DFLAG_FLUSH_EXT; |
1912 | } | 1912 | } |
1913 | 1913 | ||
1914 | if (ata_id_hpa_enabled(dev->id)) | 1914 | if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) && |
1915 | dev->n_sectors = ata_hpa_resize(dev); | 1915 | ata_id_hpa_enabled(dev->id)) |
1916 | dev->n_sectors = ata_hpa_resize(dev); | ||
1916 | 1917 | ||
1917 | /* config NCQ */ | 1918 | /* config NCQ */ |
1918 | ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc)); | 1919 | ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc)); |
@@ -3795,7 +3796,11 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
3795 | { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, | 3796 | { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, |
3796 | { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, }, | 3797 | { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, }, |
3797 | 3798 | ||
3798 | /* Devices with NCQ limits */ | 3799 | /* devices which puke on READ_NATIVE_MAX */ |
3800 | { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, }, | ||
3801 | { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA }, | ||
3802 | { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA }, | ||
3803 | { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA }, | ||
3799 | 3804 | ||
3800 | /* End Marker */ | 3805 | /* End Marker */ |
3801 | { } | 3806 | { } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 41978a557318..a67bb9075e9b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -303,6 +303,7 @@ enum { | |||
303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 303 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 304 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 305 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
306 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | enum hsm_task_states { | 309 | enum hsm_task_states { |