Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=317a46a200e6514a1acf50ed30291160185a5c73
Commit:     317a46a200e6514a1acf50ed30291160185a5c73
Parent:     6d208b39c45edee5def6c201fcd51561c5a39828
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 00:01:11 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Thu May 10 00:01:11 2007 +0200

    ide: fix PIO setup on resume for ATAPI devices
    
    PIO should be restored also for ATAPI devices during resume, fix it.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 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 8670112..8e56814 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 *
 
        memset(args, 0, sizeof(*args));
 
-       if (drive->media != ide_disk) {
-               /*
-                * skip idedisk_pm_restore_pio and idedisk_pm_idle for ATAPI
-                * devices
-                */
-               if (pm->pm_step == idedisk_pm_restore_pio)
-                       pm->pm_step = ide_pm_restore_dma;
-       }
-
        switch (pm->pm_step) {
        case ide_pm_flush_cache:        /* Suspend step 1 (flush cache) */
                if (drive->media != ide_disk)
@@ -207,7 +198,13 @@ static ide_startstop_t ide_start_power_step(ide_drive_t 
*drive, struct request *
        case idedisk_pm_restore_pio:    /* Resume step 1 (restore PIO) */
                if (drive->hwif->tuneproc != NULL)
                        drive->hwif->tuneproc(drive, 255);
-               ide_complete_power_step(drive, rq, 0, 0);
+               /*
+                * skip idedisk_pm_idle for ATAPI devices
+                */
+               if (drive->media != ide_disk)
+                       pm->pm_step = ide_pm_restore_dma;
+               else
+                       ide_complete_power_step(drive, rq, 0, 0);
                return ide_stopped;
 
        case idedisk_pm_idle:           /* Resume step 2 (idle) */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to