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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2b9a13671c5f..8226d52504d0 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -622,6 +622,8 @@ static ide_startstop_t ide_tape_issue_pc(ide_drive_t *drive,
622 622
623 if (pc->retries > IDETAPE_MAX_PC_RETRIES || 623 if (pc->retries > IDETAPE_MAX_PC_RETRIES ||
624 (pc->flags & PC_FLAG_ABORT)) { 624 (pc->flags & PC_FLAG_ABORT)) {
625 unsigned int done = blk_rq_bytes(drive->hwif->rq);
626
625 /* 627 /*
626 * We will "abort" retrying a packet command in case legitimate 628 * We will "abort" retrying a packet command in case legitimate
627 * error code was received (crossing a filemark, or end of the 629 * error code was received (crossing a filemark, or end of the
@@ -641,9 +643,10 @@ static ide_startstop_t ide_tape_issue_pc(ide_drive_t *drive,
641 /* Giving up */ 643 /* Giving up */
642 pc->error = IDE_DRV_ERROR_GENERAL; 644 pc->error = IDE_DRV_ERROR_GENERAL;
643 } 645 }
646
644 drive->failed_pc = NULL; 647 drive->failed_pc = NULL;
645 drive->pc_callback(drive, 0); 648 drive->pc_callback(drive, 0);
646 ide_complete_rq(drive, -EIO, blk_rq_bytes(drive->hwif->rq)); 649 ide_complete_rq(drive, -EIO, done);
647 return ide_stopped; 650 return ide_stopped;
648 } 651 }
649 debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]); 652 debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]);