]> git.baikalelectronics.ru Git - kernel.git/commit
libata: accept late unlocking of HPA
authorTejun Heo <tj@kernel.org>
Wed, 15 Jul 2009 08:11:41 +0000 (17:11 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 29 Jul 2009 01:07:09 +0000 (21:07 -0400)
commitfe5793da0ff60fd31d2de656b11f6bcaf7efb38e
tree4d4e1c5a47d23b1578bfde9ab223b07206a77c64
parent7b40e168b45cdedbcd56669855ef31d130bacd53
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: Tejun Heo <tj@kernel.org>
Reported-by: Christof Warlich <christof@warlich.name>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
include/linux/libata.h