From ee8a20ac5f30f12f7b93528fd77e1c40a9b76969 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 15 Jul 2008 21:22:01 +0200 Subject: [PATCH] --- yaml --- r: 101259 b: refs/heads/master c: 74e63e74ea57e06839aa5fcf016eace35da26050 h: refs/heads/master i: 101257: b7f9ea0d17d2affc8ad037705297732e21f4ede5 101255: efff371200d722c6825ad922afc40e539db1b5be v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-tape.c | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index dcbb0aced27e..0515317f486f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd2e9a032bc552f6e2ae852e81cde602c09d7d3e +refs/heads/master: 74e63e74ea57e06839aa5fcf016eace35da26050 diff --git a/trunk/drivers/ide/ide-tape.c b/trunk/drivers/ide/ide-tape.c index 0fec58ebee85..b224823a8ae7 100644 --- a/trunk/drivers/ide/ide-tape.c +++ b/trunk/drivers/ide/ide-tape.c @@ -768,6 +768,18 @@ static void idetape_postpone_request(ide_drive_t *drive) ide_stall_queue(drive, tape->dsc_poll_freq); } +static void ide_tape_handle_dsc(ide_drive_t *drive) +{ + idetape_tape_t *tape = drive->driver_data; + + /* Media access command */ + tape->dsc_polling_start = jiffies; + tape->dsc_poll_freq = IDETAPE_DSC_MA_FAST; + tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT; + /* Allow ide.c to handle other requests */ + idetape_postpone_request(drive); +} + typedef void idetape_io_buf(ide_drive_t *, struct ide_atapi_pc *, unsigned int); /* @@ -833,12 +845,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) pc->error = 0; if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && (stat & SEEK_STAT) == 0) { - /* Media access command */ - tape->dsc_polling_start = jiffies; - tape->dsc_poll_freq = IDETAPE_DSC_MA_FAST; - tape->dsc_timeout = jiffies + IDETAPE_DSC_MA_TIMEOUT; - /* Allow ide.c to handle other requests */ - idetape_postpone_request(drive); + ide_tape_handle_dsc(drive); return ide_stopped; } /* Command finished - Call the callback function */