diff options
author | Lee Trager <lt73@cs.drexel.edu> | 2007-06-08 15:14:30 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-06-08 15:14:30 +0200 |
commit | 0d2157f78d17fcee17791f54959e67cc0af0da74 (patch) | |
tree | 22782319df55322375f5fe3b8c23d1591e3fbcf0 /drivers/ide/ide.c | |
parent | 0380dad45e4f5a606025cc4df2a2cd26af08796b (diff) |
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.c')
-rw-r--r-- | drivers/ide/ide.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 6002713a20a..0af0d1614f7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1010,9 +1010,11 @@ static int generic_ide_resume(struct device *dev) { ide_drive_t *drive = dev->driver_data; ide_hwif_t *hwif = HWIF(drive); + ide_driver_t *drv = to_ide_driver(dev->driver); struct request rq; struct request_pm_state rqpm; ide_task_t args; + int err; /* Call ACPI _STM only once */ if (!(drive->dn % 2)) @@ -1029,7 +1031,12 @@ static int generic_ide_resume(struct device *dev) rqpm.pm_step = ide_pm_state_start_resume; rqpm.pm_state = PM_EVENT_ON; - return ide_do_drive_cmd(drive, &rq, ide_head_wait); + err = ide_do_drive_cmd(drive, &rq, ide_head_wait); + + if (err == 0 && drv && drv->resume) + drv->resume(drive); + + return err; } int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev, |