Skip to content
Commit 445d211b authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarOleksandr Yermolenko <yaa.bta@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 68b0ddb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment