diff options
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 702a627b0083..7d275b2af3eb 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -132,10 +132,14 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) | |||
132 | } | 132 | } |
133 | EXPORT_SYMBOL(ide_end_request); | 133 | EXPORT_SYMBOL(ide_end_request); |
134 | 134 | ||
135 | static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error) | 135 | static void ide_complete_power_step(ide_drive_t *drive, struct request *rq) |
136 | { | 136 | { |
137 | struct request_pm_state *pm = rq->data; | 137 | struct request_pm_state *pm = rq->data; |
138 | 138 | ||
139 | #ifdef DEBUG_PM | ||
140 | printk(KERN_INFO "%s: complete_power_step(step: %d)\n", | ||
141 | drive->name, pm->pm_step); | ||
142 | #endif | ||
139 | if (drive->media != ide_disk) | 143 | if (drive->media != ide_disk) |
140 | return; | 144 | return; |
141 | 145 | ||
@@ -172,7 +176,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
172 | /* Not supported? Switch to next step now. */ | 176 | /* Not supported? Switch to next step now. */ |
173 | if (ata_id_flush_enabled(drive->id) == 0 || | 177 | if (ata_id_flush_enabled(drive->id) == 0 || |
174 | (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) { | 178 | (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) { |
175 | ide_complete_power_step(drive, rq, 0, 0); | 179 | ide_complete_power_step(drive, rq); |
176 | return ide_stopped; | 180 | return ide_stopped; |
177 | } | 181 | } |
178 | if (ata_id_flush_ext_enabled(drive->id)) | 182 | if (ata_id_flush_ext_enabled(drive->id)) |
@@ -191,7 +195,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
191 | if (drive->media != ide_disk) | 195 | if (drive->media != ide_disk) |
192 | pm->pm_step = IDE_PM_RESTORE_DMA; | 196 | pm->pm_step = IDE_PM_RESTORE_DMA; |
193 | else | 197 | else |
194 | ide_complete_power_step(drive, rq, 0, 0); | 198 | ide_complete_power_step(drive, rq); |
195 | return ide_stopped; | 199 | return ide_stopped; |
196 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ | 200 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ |
197 | args->tf.command = ATA_CMD_IDLEIMMEDIATE; | 201 | args->tf.command = ATA_CMD_IDLEIMMEDIATE; |
@@ -320,11 +324,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
320 | } | 324 | } |
321 | } else if (blk_pm_request(rq)) { | 325 | } else if (blk_pm_request(rq)) { |
322 | struct request_pm_state *pm = rq->data; | 326 | struct request_pm_state *pm = rq->data; |
323 | #ifdef DEBUG_PM | 327 | |
324 | printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n", | 328 | ide_complete_power_step(drive, rq); |
325 | drive->name, rq->pm->pm_step, stat, err); | ||
326 | #endif | ||
327 | ide_complete_power_step(drive, rq, stat, err); | ||
328 | if (pm->pm_step == IDE_PM_COMPLETED) | 329 | if (pm->pm_step == IDE_PM_COMPLETED) |
329 | ide_complete_pm_request(drive, rq); | 330 | ide_complete_pm_request(drive, rq); |
330 | return; | 331 | return; |
@@ -802,7 +803,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
802 | struct request_pm_state *pm = rq->data; | 803 | struct request_pm_state *pm = rq->data; |
803 | #ifdef DEBUG_PM | 804 | #ifdef DEBUG_PM |
804 | printk("%s: start_power_step(step: %d)\n", | 805 | printk("%s: start_power_step(step: %d)\n", |
805 | drive->name, rq->pm->pm_step); | 806 | drive->name, pm->pm_step); |
806 | #endif | 807 | #endif |
807 | startstop = ide_start_power_step(drive, rq); | 808 | startstop = ide_start_power_step(drive, rq); |
808 | if (startstop == ide_stopped && | 809 | if (startstop == ide_stopped && |