aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-core.c7
-rw-r--r--include/linux/libata.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d2880b013c88..eb9709864a21 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -915,7 +915,8 @@ static int ata_read_native_max_address(struct ata_device *dev, u64 *max_sectors)
915 *max_sectors = ata_tf_to_lba48(&tf); 915 *max_sectors = ata_tf_to_lba48(&tf);
916 else 916 else
917 *max_sectors = ata_tf_to_lba(&tf); 917 *max_sectors = ata_tf_to_lba(&tf);
918 918 if (dev->horkage & ATA_HORKAGE_HPA_SIZE)
919 (*max_sectors)--;
919 return 0; 920 return 0;
920} 921}
921 922
@@ -3905,6 +3906,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
3905 { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA }, 3906 { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
3906 { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA }, 3907 { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
3907 3908
3909 /* Devices which report 1 sector over size HPA */
3910 { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, },
3911 { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, },
3912
3908 /* End Marker */ 3913 /* End Marker */
3909 { } 3914 { }
3910}; 3915};
diff --git a/include/linux/libata.h b/include/linux/libata.h
index cd9c2a28136a..f9ed198e4fcd 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -330,6 +330,7 @@ enum {
330 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ 330 ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */
331 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ 331 ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */
332 ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ 332 ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */
333 ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */
333}; 334};
334 335
335enum hsm_task_states { 336enum hsm_task_states {