summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-15 18:09:33 (GMT)
committerJeff Garzik <jgarzik@redhat.com>2010-06-02 17:50:07 (GMT)
commit68939ce5fc17ee9c03ef6e543d4f82bd9f5583d4 (patch)
tree7f1e0d98c7c6fe102393d80f07efca6ada8c3fde /drivers/ata
parent72ec24bd7725545bc149d80cbd21a7578d9aa206 (diff)
downloadlinux-68939ce5fc17ee9c03ef6e543d4f82bd9f5583d4.tar.xz
libata: use the enlarged capacity after late HPA unlock
After late HPA unlock, libata kept using the original capacity ignoring the new larger native capacity. Enlarging device on the fly doesn't cause any harm. Use the larger native capacity instead. This will enable on-demand HPA unlocking. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 06b7e49..1e5d0a3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4119,9 +4119,8 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
dev->n_sectors > n_sectors && dev->n_sectors == n_native_sectors) {
ata_dev_printk(dev, KERN_WARNING,
"new n_sectors matches native, probably "
- "late HPA unlock, continuing\n");
- /* keep using the old n_sectors */
- dev->n_sectors = n_sectors;
+ "late HPA unlock, n_sectors updated\n");
+ /* use the larger n_sectors */
return 0;
}