aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:30 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:30 -0400
commitb14c72127fbe8f97e49de7437520175673f7306a (patch)
tree7cf54dd800cbb004cd44a947f2a4530fe132a26b /drivers/ide/ide-tape.c
parent9b5a18e19f8c610c270ee9a0ba03177d737f6aa5 (diff)
ide: drop dsc_handle argument from ide_pc_intr()
* Add 'int dsc' argument to ->pc_callback method. * Call ide_tape_handle_dsc() internally in ide_tape_callback() if dsc argument is set and update ide_pc_intr() accordingly. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index f8c84df4a0bc..70b499a617d8 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -522,7 +522,9 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
522 return 0; 522 return 0;
523} 523}
524 524
525static void ide_tape_callback(ide_drive_t *drive) 525static void ide_tape_handle_dsc(ide_drive_t *);
526
527static void ide_tape_callback(ide_drive_t *drive, int dsc)
526{ 528{
527 idetape_tape_t *tape = drive->driver_data; 529 idetape_tape_t *tape = drive->driver_data;
528 struct ide_atapi_pc *pc = tape->pc; 530 struct ide_atapi_pc *pc = tape->pc;
@@ -530,6 +532,9 @@ static void ide_tape_callback(ide_drive_t *drive)
530 532
531 debug_log(DBG_PROCS, "Enter %s\n", __func__); 533 debug_log(DBG_PROCS, "Enter %s\n", __func__);
532 534
535 if (dsc)
536 ide_tape_handle_dsc(drive);
537
533 if (tape->failed_pc == pc) 538 if (tape->failed_pc == pc)
534 tape->failed_pc = NULL; 539 tape->failed_pc = NULL;
535 540
@@ -658,7 +663,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
658 663
659 return ide_pc_intr(drive, tape->pc, idetape_pc_intr, WAIT_TAPE_CMD, 664 return ide_pc_intr(drive, tape->pc, idetape_pc_intr, WAIT_TAPE_CMD,
660 NULL, idetape_update_buffers, idetape_retry_pc, 665 NULL, idetape_update_buffers, idetape_retry_pc,
661 ide_tape_handle_dsc, ide_tape_io_buffers); 666 ide_tape_io_buffers);
662} 667}
663 668
664/* 669/*
@@ -743,7 +748,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
743 pc->error = IDETAPE_ERROR_GENERAL; 748 pc->error = IDETAPE_ERROR_GENERAL;
744 } 749 }
745 tape->failed_pc = NULL; 750 tape->failed_pc = NULL;
746 drive->pc_callback(drive); 751 drive->pc_callback(drive, 0);
747 return ide_stopped; 752 return ide_stopped;
748 } 753 }
749 debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]); 754 debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]);
@@ -805,7 +810,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
805 pc->error = IDETAPE_ERROR_GENERAL; 810 pc->error = IDETAPE_ERROR_GENERAL;
806 tape->failed_pc = NULL; 811 tape->failed_pc = NULL;
807 } 812 }
808 drive->pc_callback(drive); 813 drive->pc_callback(drive, 0);
809 return ide_stopped; 814 return ide_stopped;
810} 815}
811 816