Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd35b7bb86c1ae6adddf68db71481144941246d1
Commit:     dd35b7bb86c1ae6adddf68db71481144941246d1
Parent:     d3bad45f0232e273cce9237d66c98aafe12c0b0e
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 20 00:32:37 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Oct 20 00:32:37 2007 +0200

    ide: check ->dma_setup() return value in flagged_taskfile()
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-taskfile.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 24c6c3f..6812f47 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -837,9 +837,11 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, 
ide_task_t *task)
                case TASKFILE_OUT_DMA:
                case TASKFILE_IN_DMAQ:
                case TASKFILE_IN_DMA:
-                       hwif->dma_setup(drive);
-                       hwif->dma_exec_cmd(drive, taskfile->command);
-                       hwif->dma_start(drive);
+                       if (!hwif->dma_setup(drive)) {
+                               hwif->dma_exec_cmd(drive, taskfile->command);
+                               hwif->dma_start(drive);
+                               return ide_started;
+                       }
                        break;
 
                default:
@@ -853,7 +855,8 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, 
ide_task_t *task)
                                return task->prehandler(drive, task->rq);
                        }
                        ide_execute_command(drive, taskfile->command, 
task->handler, WAIT_WORSTCASE, NULL);
+                       return ide_started;
        }
 
-       return ide_started;
+       return ide_stopped;
 }
-
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