36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From e13b2d1562dcb843852e677a1cb599b94f023604 Mon Sep 17 00:00:00 2001
|
|
From: Tejun Heo <tj@kernel.org>
|
|
Date: Sat, 15 May 2010 19:55:32 +0200
|
|
Subject: [PATCH 7/8] 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>
|
|
---
|
|
drivers/ata/libata-core.c | 5 ++---
|
|
1 files changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
|
|
index 86f405b..9d6e92d 100644
|
|
--- a/drivers/ata/libata-core.c
|
|
+++ b/drivers/ata/libata-core.c
|
|
@@ -4212,9 +4212,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;
|
|
}
|
|
|
|
--
|
|
1.7.1
|
|
|