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

libata: accept late unlocking of HPA



On certain configurations, HPA isn't or can't be unlocked during
probing but it somehow ends up unlocked afterwards.  In the following
thread, the problem can be reliably reproduced after resuming from
STR.  The BIOS turns on HPA during boot but forgets to do it during
resume.

  http://thread.gmane.org/gmane.linux.kernel/858310

This patch updates libata revalidation such that it considers native
n_sectors.  If the device size has increased to match native
n_sectors, it's assumed that HPA has been unlocked involuntarily and
the device is recognized as the same one.  This should be fairly safe
while nicely working around the problem.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarChristof Warlich <christof@warlich.name>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 7d084d96
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment