aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-tape.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 0fec58ebee85..b224823a8ae7 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -768,6 +768,18 @@ static void idetape_postpone_request(ide_drive_t *drive)
768 ide_stall_queue(drive, tape->dsc_poll_freq); 768 ide_stall_queue(drive, tape->dsc_poll_freq);
769} 769}
770 770
771static void ide_tape_handle_dsc(ide_drive_t *drive)
772{
773 idetape_tape_t *tape = drive->driver_data;
774
775 /* Media access command */
776 tape->dsc_polling_start = jiffies;
777 tape->dsc_poll_freq = IDETAPE_DSC_MA_FAST;
778 tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT;
779 /* Allow ide.c to handle other requests */
780 idetape_postpone_request(drive);
781}
782
771typedef void idetape_io_buf(ide_drive_t *, struct ide_atapi_pc *, unsigned int); 783typedef void idetape_io_buf(ide_drive_t *, struct ide_atapi_pc *, unsigned int);
772 784
773/* 785/*
@@ -833,12 +845,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
833 pc->error = 0; 845 pc->error = 0;
834 if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && 846 if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) &&
835 (stat & SEEK_STAT) == 0) { 847 (stat & SEEK_STAT) == 0) {
836 /* Media access command */ 848 ide_tape_handle_dsc(drive);
837 tape->dsc_polling_start = jiffies;
838 tape->dsc_poll_freq = IDETAPE_DSC_MA_FAST;
839 tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT;
840 /* Allow ide.c to handle other requests */
841 idetape_postpone_request(drive);
842 return ide_stopped; 849 return ide_stopped;
843 } 850 }
844 /* Command finished - Call the callback function */ 851 /* Command finished - Call the callback function */