diff options
author | Alan Cox <alan@redhat.com> | 2007-09-29 04:06:48 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:43 -0400 |
commit | 93328e1145c1989d1a214d34ac4e968dea7f7ed7 (patch) | |
tree | 3b22b8453c9c3526abeb68efcc45eacff4e6574b /drivers/ata | |
parent | 54174db300ee1bac632d62e4ac37fe02e47d1f18 (diff) |
[PATCH] libata: Fix HPA handling regression
Restore the support for handling drives that report one sector too many
(ie SCSI not ATA style). This worked before the HPA update but was
removed in that process.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 7 |
1 files changed, 6 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 | }; |