diff options
author | Lee Trager <lt73@cs.drexel.edu> | 2007-06-08 17:14:30 +0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-06-08 17:14:30 +0400 |
commit | 0d2157f78d17fcee17791f54959e67cc0af0da74 (patch) | |
tree | 22782319df55322375f5fe3b8c23d1591e3fbcf0 /drivers/ide/ide-disk.c | |
parent | 0380dad45e4f5a606025cc4df2a2cd26af08796b (diff) | |
download | linux-0d2157f78d17fcee17791f54959e67cc0af0da74.tar.xz |
ide: HPA detect from resume
Currently when system which have HPA require HPA to be detected and
disabled upon resume from RAM or disk. The current IDE drivers do not do
this nor does libata (obviously it since it doesn't support HPA yet).
I have implemented this into the current IDE drivers and it has been
tested by many others since 7/15/2006 in bug number 6840:
http://bugzilla.kernel.org/show_bug.cgi?id=6840
and it has been confirmed to work fine with no problems.
bart: added drv != NULL check to generic_ide_suspend()
From: Lee Trager <lt73@cs.drexel.edu>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7fff773f2df7..dc2175c81f5e 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -1037,6 +1037,17 @@ static void ide_disk_release(struct kref *kref) static int ide_disk_probe(ide_drive_t *drive); +/* + * On HPA drives the capacity needs to be + * reinitilized on resume otherwise the disk + * can not be used and a hard reset is required + */ +static void ide_disk_resume(ide_drive_t *drive) +{ + if (idedisk_supports_hpa(drive->id)) + init_idedisk_capacity(drive); +} + static void ide_device_shutdown(ide_drive_t *drive) { #ifdef CONFIG_ALPHA @@ -1071,6 +1082,7 @@ static ide_driver_t idedisk_driver = { }, .probe = ide_disk_probe, .remove = ide_disk_remove, + .resume = ide_disk_resume, .shutdown = ide_device_shutdown, .version = IDEDISK_VERSION, .media = ide_disk, |