Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e582ba4ef6264dd8cb73250ebff767d0624d684
Commit:     1e582ba4ef6264dd8cb73250ebff767d0624d684
Parent:     7d77b247088fb360aa74bfdd9e19bce1e1987668
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 21 20:07:14 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:42 2007 -0400

    libata: fix ata_set_max_sectors()
    
    In ata_set_max_sectors(), the highest nibble in LBA28 mode was
    missing.  This made drives sized between 8G and 128G with HPA turned
    on to be resized to under 8G.  Fix it.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8b08e7b..fd4563d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -950,9 +950,12 @@ static int ata_set_max_sectors(struct ata_device *dev, u64 
new_sectors)
                tf.hob_lbal = (new_sectors >> 24) & 0xff;
                tf.hob_lbam = (new_sectors >> 32) & 0xff;
                tf.hob_lbah = (new_sectors >> 40) & 0xff;
-       } else
+       } else {
                tf.command = ATA_CMD_SET_MAX;
 
+               tf.device |= (new_sectors >> 24) & 0xf;
+       }
+
        tf.protocol |= ATA_PROT_NODATA;
        tf.device |= ATA_LBA;
 
-
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

Reply via email to