Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eba15fba1f046d25c663d294fc919ab59cec3e9c
Commit:     eba15fba1f046d25c663d294fc919ab59cec3e9c
Parent:     f1071e628bc769174c3e2df7827a2a8ad05aea67
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 1 23:09:17 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 23:09:17 2008 +0100

    ide-cd: fix DMA error handling in cdrom_newpc_intr()
    
    Make cdrom_newpc_intr() match cdrom_{read,write}_intr() w.r.t.
    handling DMA errors:
    
    * disable DMA before cdrom_decode_status() call
    
    * log the device name and the type of the request (read/write)
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-cd.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index cbe4f1a..c638d05 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1674,6 +1674,11 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t 
*drive)
        if (dma) {
                info->dma = 0;
                dma_error = HWIF(drive)->ide_dma_end(drive);
+               if (dma_error) {
+                       printk(KERN_ERR "%s: DMA %s error\n", drive->name,
+                                       rq_data_dir(rq) ? "write" : "read");
+                       ide_dma_off(drive);
+               }
        }
 
        if (cdrom_decode_status(drive, 0, &stat))
@@ -1683,11 +1688,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t 
*drive)
         * using dma, transfer is complete now
         */
        if (dma) {
-               if (dma_error) {
-                       printk(KERN_ERR "ide-cd: dma error\n");
-                       ide_dma_off(drive);
+               if (dma_error)
                        return ide_error(drive, "dma error", stat);
-               }
 
                spin_lock_irqsave(&ide_lock, flags);
                if (__blk_end_request(rq, 0, rq->data_len))
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to