diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 4c7792fd5f93..081aed6781cc 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -699,6 +699,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
699 | 699 | ||
700 | out_end: | 700 | out_end: |
701 | if (blk_pc_request(rq) && rc == 0) { | 701 | if (blk_pc_request(rq) && rc == 0) { |
702 | rq->resid_len = 0; | ||
702 | blk_end_request_all(rq, 0); | 703 | blk_end_request_all(rq, 0); |
703 | hwif->rq = NULL; | 704 | hwif->rq = NULL; |
704 | } else { | 705 | } else { |
@@ -718,8 +719,7 @@ out_end: | |||
718 | 719 | ||
719 | /* make sure it's fully ended */ | 720 | /* make sure it's fully ended */ |
720 | if (blk_fs_request(rq) == 0) { | 721 | if (blk_fs_request(rq) == 0) { |
721 | rq->resid_len = blk_rq_bytes(rq) - | 722 | rq->resid_len -= cmd->nbytes - cmd->nleft; |
722 | (cmd->nbytes - cmd->nleft); | ||
723 | if (uptodate == 0 && (cmd->tf_flags & IDE_TFLAG_WRITE)) | 723 | if (uptodate == 0 && (cmd->tf_flags & IDE_TFLAG_WRITE)) |
724 | rq->resid_len += cmd->last_xfer_len; | 724 | rq->resid_len += cmd->last_xfer_len; |
725 | } | 725 | } |