aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
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