Skip to contentSkip to conversation

ide: check drive->using_dma in flagged_taskfile()

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Oct 8, 2007 – Oct 9, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 2/12 ide: check drive->using_dma in flagged_taskfile()

---
 drivers/ide/ide-taskfile.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/ide/ide-taskfile.c +3 -0
Index: b/drivers/ide/ide-taskfile.c
===================================================================
@@ -827,6 +827,9 @@ ide_startstop_t flagged_taskfile (ide_dr
 		case TASKFILE_OUT_DMA:
 		case TASKFILE_IN_DMAQ:
 		case TASKFILE_IN_DMA:
+			if (!drive->using_dma)
+				break;
+
 			if (!hwif->dma_setup(drive)) {
 				hwif->dma_exec_cmd(drive, taskfile->command);
 				hwif->dma_start(drive);