From: Tejun Heo Date: Sat, 15 May 2010 18:09:33 +0000 (+0200) Subject: libata: use the enlarged capacity after late HPA unlock X-Git-Tag: v2.6.35-rc2~42^2~1 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=68939ce5fc17ee9c03ef6e543d4f82bd9f5583d4;p=net-next-2.6.git 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 Cc: Ben Hutchings Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 06b7e49e039..1e5d0a36a0a 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; }