| summaryrefslogtreecommitdiff |
Side-by-side diff
Diffstat (limited to 'patches.drivers/libata-fix-set_max_sectors') (more/less context) (show whitespace changes)
| -rw-r--r-- | patches.drivers/libata-fix-set_max_sectors | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/patches.drivers/libata-fix-set_max_sectors b/patches.drivers/libata-fix-set_max_sectors new file mode 100644 index 0000000..795425f --- a/dev/null +++ b/patches.drivers/libata-fix-set_max_sectors @@ -0,0 +1,32 @@ +From: Tejun Heo <teheo@suse.de> +Subject: [PATCH] libata: fix ata_set_max_sectors() +References: 325552 +Patch-Mainline: will be submitted after verified + +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 <teheo@suse.de> +--- + drivers/ata/libata-core.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: linux-2.6.22/drivers/ata/libata-core.c +=================================================================== +--- linux-2.6.22.orig/drivers/ata/libata-core.c ++++ linux-2.6.22/drivers/ata/libata-core.c +@@ -975,9 +975,12 @@ static int ata_set_max_sectors(struct at + 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; + |