From: Tejun Heo Date: Mon, 14 May 2007 18:28:15 +0000 (+0900) Subject: libata: during revalidation, check n_sectors after device is configured X-Git-Tag: v2.6.22-rc2~64^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ddcd3b0201a7ad72294347636d2b4028ddbd95d;p=pandora-kernel.git libata: during revalidation, check n_sectors after device is configured Device might be resized during ata_dev_configure() due to HPA or (later) ACPI _GTF. Currently it's worked around by caching n_sectors before turning off HPA. The cached original size is overwritten if the device is reconfigured without being hardreset - which always happens after configuring trasnfer mode. If the device gets hardreset for some reason after that, revalidation fails with -ENODEV. This patch makes size checking more robust by moving n_sectors check from ata_dev_reread_id() to ata_dev_revalidate() after the device is fully configured. No matter what happens during configuration, a device must have the same n_sectors after fully configured to be treated as the same device. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed