From: Tejun Heo Date: Mon, 5 Apr 2010 01:33:13 +0000 (+0900) Subject: libata: unlock HPA if device shrunk X-Git-Tag: v2.6.34-rc4~63^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=445d211b0da4e9a6e6d576edff85085c2aaf53df;p=pandora-kernel.git libata: unlock HPA if device shrunk Some BIOSes don't configure HPA during boot but do so while resuming. This causes harddrives to shrink during resume making libata detach and reattach them. This can be worked around by unlocking HPA if old size equals native size. Add ATA_DFLAG_UNLOCK_HPA so that HPA unlocking can be controlled per-device and update ata_dev_revalidate() such that it sets ATA_DFLAG_UNLOCK_HPA and fails with -EIO when the above condition is detected. This patch fixes the following bug. https://bugzilla.kernel.org/show_bug.cgi?id=15396 Signed-off-by: Tejun Heo Reported-by: Oleksandr Yermolenko Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed