[Patch] keep ide disk sleeping when resuming

Peter Münster
2005-02-02T19:50:25Z

Hello,

I need this patch (against linux-2.6.11-rc2), to keep ide disk sleeping,
when resuming from ACPI S1.

In fact, it's just removing a patch from 22 Jun 2004 by Jens Axboe. He has
told me, that "We can probably kill the patch completely".
So, this is what I'm doing now.

Kind regards, Peter

--- drivers/ide/ide-disk.c.orig 2005-02-02 20:30:12.000000000 +0100
+++ drivers/ide/ide-disk.c 2005-02-02 20:32:21.000000000 +0100
@@ -864,9 +864,7 @@
enum {
idedisk_pm_flush_cache = ide_pm_state_start_suspend,
idedisk_pm_standby,
-
- idedisk_pm_idle = ide_pm_state_start_resume,
- idedisk_pm_restore_dma,
+ idedisk_pm_restore_dma = ide_pm_state_start_resume
};

static void idedisk_complete_power_step (ide_drive_t *drive, struct request *rq, u8 stat, u8 error)
@@ -881,9 +879,6 @@
case idedisk_pm_standby: /* Suspend step 2 (standby) complete */
rq->pm->pm_step = ide_pm_state_completed;
break;
- case idedisk_pm_idle: /* Resume step 1 (idle) complete */
- rq->pm->pm_step = idedisk_pm_restore_dma;
- break;
}
}

@@ -914,12 +909,6 @@
args->handler = &task_no_data_intr;
return do_rw_taskfile(drive, args);

- case idedisk_pm_idle: /* Resume step 1 (idle) */
- args->tfRegister[IDE_COMMAND_OFFSET] = WIN_IDLEIMMEDIATE;
- args->command_type = IDE_DRIVE_TASK_NO_DATA;
- args->handler = task_no_data_intr;
- return do_rw_taskfile(drive, args);
-
case idedisk_pm_restore_dma: /* Resume step 2 (restore DMA) */
/*
* Right now, all we do is call hwif->ide_dma_check(drive),

--