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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7149224d1fe9..65c5b705883a 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -380,7 +380,7 @@ static int ide_tape_callback(ide_drive_t *drive, int dsc)
380 } 380 }
381 381
382 tape->first_frame += blocks; 382 tape->first_frame += blocks;
383 rq->data_len -= blocks * tape->blk_size; 383 rq->resid_len = rq->data_len - blocks * tape->blk_size;
384 384
385 if (pc->error) { 385 if (pc->error) {
386 uptodate = 0; 386 uptodate = 0;
@@ -903,7 +903,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
903 blk_execute_rq(drive->queue, tape->disk, rq, 0); 903 blk_execute_rq(drive->queue, tape->disk, rq, 0);
904 904
905 /* calculate the number of transferred bytes and update buffer state */ 905 /* calculate the number of transferred bytes and update buffer state */
906 size -= rq->data_len; 906 size -= rq->resid_len;
907 tape->cur = tape->buf; 907 tape->cur = tape->buf;
908 if (cmd == REQ_IDETAPE_READ) 908 if (cmd == REQ_IDETAPE_READ)
909 tape->valid = size; 909 tape->valid = size;