Commit:     14e04c3f6e64bac468f0aa38c6d47aa95b60c074
Parent:     0e7d8d480259319649f7a2c230622b98758d1c83
Author:     Kiyoshi Ueda <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 19 01:41:26 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Tue Feb 19 01:41:26 2008 +0100

    ide-cd: fix missing residual count setting in DMA mode
    This patch fixes the missing residual count setting in DMA mode,
    which was introduced during the conversion to blk-end-request.
    The residual count could be used by the request submitter.
    So if it isn't set correctly, some upper layers does not work.
    (e.g. wodim for CD burning.)
    The bug is in only DMA mode.
    In PIO mode, we are setting the residual count correctly,
    so no need to fix.
    Signed-off-by: Kiyoshi Ueda <[EMAIL PROTECTED]>
    Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]>
    Reported-by: Andreas Schwab <[EMAIL PROTECTED]>
    Tested-by: Andreas Schwab <[EMAIL PROTECTED]>
    Tested-by: Laura Garcia <[EMAIL PROTECTED]>
    Tested-by: Borislav Petkov <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
 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 354c91d..310e497 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 
        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))
                HWGROUP(drive)->rq = NULL;
                spin_unlock_irqrestore(&ide_lock, flags);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to