diff options
author | Tejun Heo <htejun@gmail.com> | 2007-05-14 14:28:15 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-16 01:18:30 -0400 |
commit | 6ddcd3b0201a7ad72294347636d2b4028ddbd95d (patch) | |
tree | ef2d28ea1775693f632705ebe71ad3e451cd69f1 /include | |
parent | fe30911b34098db58c21d0f936f6c3f17f32deb8 (diff) |
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 <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 27d936279574..b38a0f9bc9f7 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -431,7 +431,6 @@ struct ata_device { | |||
431 | struct scsi_device *sdev; /* attached SCSI device */ | 431 | struct scsi_device *sdev; /* attached SCSI device */ |
432 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 432 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
433 | u64 n_sectors; /* size of device, if ATA */ | 433 | u64 n_sectors; /* size of device, if ATA */ |
434 | u64 n_sectors_boot; /* size of ATA device at startup */ | ||
435 | unsigned int class; /* ATA_DEV_xxx */ | 434 | unsigned int class; /* ATA_DEV_xxx */ |
436 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 435 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
437 | u8 pio_mode; | 436 | u8 pio_mode; |