aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:22:01 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:22:01 -0400
commitdd2e9a032bc552f6e2ae852e81cde602c09d7d3e (patch)
tree4252e71a2a3c1bbe0c5fd2eae404b09f1d99208e /drivers/ide/ide-tape.c
parent6bf1641ca1c7554f0da54aaf89788731b541bacc (diff)
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
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>---
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7907a1e41918..0fec58ebee85 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -627,6 +627,9 @@ static void ide_tape_callback(ide_drive_t *drive)
627 627
628 debug_log(DBG_PROCS, "Enter %s\n", __func__); 628 debug_log(DBG_PROCS, "Enter %s\n", __func__);
629 629
630 if (tape->failed_pc == pc)
631 tape->failed_pc = NULL;
632
630 if (pc->c[0] == REQUEST_SENSE) { 633 if (pc->c[0] == REQUEST_SENSE) {
631 if (uptodate) 634 if (uptodate)
632 idetape_analyze_error(drive, pc->buf); 635 idetape_analyze_error(drive, pc->buf);
@@ -838,8 +841,6 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
838 idetape_postpone_request(drive); 841 idetape_postpone_request(drive);
839 return ide_stopped; 842 return ide_stopped;
840 } 843 }
841 if (tape->failed_pc == pc)
842 tape->failed_pc = NULL;
843 /* Command finished - Call the callback function */ 844 /* Command finished - Call the callback function */
844 pc->callback(drive); 845 pc->callback(drive);
845 return ide_stopped; 846 return ide_stopped;
@@ -1050,8 +1051,6 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
1050 return ide_stopped; 1051 return ide_stopped;
1051 } 1052 }
1052 pc->error = 0; 1053 pc->error = 0;
1053 if (tape->failed_pc == pc)
1054 tape->failed_pc = NULL;
1055 } else { 1054 } else {
1056 pc->error = IDETAPE_ERROR_GENERAL; 1055 pc->error = IDETAPE_ERROR_GENERAL;
1057 tape->failed_pc = NULL; 1056 tape->failed_pc = NULL;