diff options
-rw-r--r-- | drivers/ide/ide-cd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 354c91d06a6..310e497b583 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1207,9 +1207,13 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) end_request: if (blk_pc_request(rq)) { unsigned long flags; + unsigned int dlen = rq->data_len; + + if (dma) + rq->data_len = 0; spin_lock_irqsave(&ide_lock, flags); - if (__blk_end_request(rq, 0, rq->data_len)) + if (__blk_end_request(rq, 0, dlen)) BUG(); HWGROUP(drive)->rq = NULL; spin_unlock_irqrestore(&ide_lock, flags); |