Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=93328e1145c1989d1a214d34ac4e968dea7f7ed7 Commit: 93328e1145c1989d1a214d34ac4e968dea7f7ed7 Parent: 54174db300ee1bac632d62e4ac37fe02e47d1f18 Author: Alan Cox <[EMAIL PROTECTED]> AuthorDate: Sat Sep 29 04:06:48 2007 -0400 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Fri Oct 12 14:55:43 2007 -0400
[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 <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 7 ++++++- include/linux/libata.h | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index d2880b0..eb97098 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) *max_sectors = ata_tf_to_lba48(&tf); else *max_sectors = ata_tf_to_lba(&tf); - + if (dev->horkage & ATA_HORKAGE_HPA_SIZE) + (*max_sectors)--; return 0; } @@ -3905,6 +3906,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA }, { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA }, + /* Devices which report 1 sector over size HPA */ + { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, }, + { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, }, + /* End Marker */ { } }; diff --git a/include/linux/libata.h b/include/linux/libata.h index cd9c2a2..f9ed198 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -330,6 +330,7 @@ enum { ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ + ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ }; enum hsm_task_states { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html