]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 Jul 2008 19:22:01 +0000 (21:22 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 15 Jul 2008 19:22:01 +0000 (21:22 +0200)
Move checking/resetting of ->failed_pc from ide*_pc_intr() to ->callback
as a preparation for adding generic ide_pc_intr() helper.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>---
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c

index e658aafc51dac6db5f8e5c074ef14cbc120743c4..b1d6905fd8ea2e77122cc2b492e81d6101910de1 100644 (file)
@@ -320,6 +320,9 @@ static void ide_floppy_callback(ide_drive_t *drive)
 
        debug_log("Reached %s\n", __func__);
 
+       if (floppy->failed_pc == pc)
+               floppy->failed_pc = NULL;
+
        if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 ||
            (pc->rq && blk_pc_request(pc->rq)))
                uptodate = 1; /* FIXME */
@@ -435,8 +438,6 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
                        return ide_stopped;
                }
                pc->error = 0;
-               if (floppy->failed_pc == pc)
-                       floppy->failed_pc = NULL;
                /* Command finished - Call the callback function */
                pc->callback(drive);
                return ide_stopped;
index 7907a1e41918491318c09f1aec042b77be0e552c..0fec58ebee857dda1267624ec79c99b6a33d5bcb 100644 (file)
@@ -627,6 +627,9 @@ static void ide_tape_callback(ide_drive_t *drive)
 
        debug_log(DBG_PROCS, "Enter %s\n", __func__);
 
+       if (tape->failed_pc == pc)
+               tape->failed_pc = NULL;
+
        if (pc->c[0] == REQUEST_SENSE) {
                if (uptodate)
                        idetape_analyze_error(drive, pc->buf);
@@ -838,8 +841,6 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
                        idetape_postpone_request(drive);
                        return ide_stopped;
                }
-               if (tape->failed_pc == pc)
-                       tape->failed_pc = NULL;
                /* Command finished - Call the callback function */
                pc->callback(drive);
                return ide_stopped;
@@ -1050,8 +1051,6 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
                        return ide_stopped;
                }
                pc->error = 0;
-               if (tape->failed_pc == pc)
-                       tape->failed_pc = NULL;
        } else {
                pc->error = IDETAPE_ERROR_GENERAL;
                tape->failed_pc = NULL;