diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-io.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 8670112f1d39..8e568143d90d 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -172,15 +172,6 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
172 | 172 | ||
173 | memset(args, 0, sizeof(*args)); | 173 | memset(args, 0, sizeof(*args)); |
174 | 174 | ||
175 | if (drive->media != ide_disk) { | ||
176 | /* | ||
177 | * skip idedisk_pm_restore_pio and idedisk_pm_idle for ATAPI | ||
178 | * devices | ||
179 | */ | ||
180 | if (pm->pm_step == idedisk_pm_restore_pio) | ||
181 | pm->pm_step = ide_pm_restore_dma; | ||
182 | } | ||
183 | |||
184 | switch (pm->pm_step) { | 175 | switch (pm->pm_step) { |
185 | case ide_pm_flush_cache: /* Suspend step 1 (flush cache) */ | 176 | case ide_pm_flush_cache: /* Suspend step 1 (flush cache) */ |
186 | if (drive->media != ide_disk) | 177 | if (drive->media != ide_disk) |
@@ -207,7 +198,13 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
207 | case idedisk_pm_restore_pio: /* Resume step 1 (restore PIO) */ | 198 | case idedisk_pm_restore_pio: /* Resume step 1 (restore PIO) */ |
208 | if (drive->hwif->tuneproc != NULL) | 199 | if (drive->hwif->tuneproc != NULL) |
209 | drive->hwif->tuneproc(drive, 255); | 200 | drive->hwif->tuneproc(drive, 255); |
210 | ide_complete_power_step(drive, rq, 0, 0); | 201 | /* |
202 | * skip idedisk_pm_idle for ATAPI devices | ||
203 | */ | ||
204 | if (drive->media != ide_disk) | ||
205 | pm->pm_step = ide_pm_restore_dma; | ||
206 | else | ||
207 | ide_complete_power_step(drive, rq, 0, 0); | ||
211 | return ide_stopped; | 208 | return ide_stopped; |
212 | 209 | ||
213 | case idedisk_pm_idle: /* Resume step 2 (idle) */ | 210 | case idedisk_pm_idle: /* Resume step 2 (idle) */ |