diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 97abc91..3d7127b 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -185,6 +185,7 @@
 	u8 lba48		= (drive->addressing == 1) ? 1 : 0;
 	ide_task_t		task;
 	struct ide_taskfile	*tf = &task.tf;
+	ide_startstop_t		rc;
 
 	if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) {
 		if (block + rq->nr_sectors > 1ULL << 28)
@@ -252,32 +253,22 @@
 		task.tf_flags |= IDE_TFLAG_WRITE;
 
 	ide_tf_set_cmd(drive, &task, dma);
+	if (!dma)
+		hwif->data_phase = task.data_phase;
+	task.rq = rq;
 
-	ide_tf_load(drive, &task);
+	rc = do_rw_taskfile(drive, &task);
 
-	if (dma) {
-		if (!hwif->dma_setup(drive)) {
-			hwif->dma_exec_cmd(drive, tf->command);
-			hwif->dma_start(drive);
-			return ide_started;
-		}
+	if (rc == ide_stopped && dma) {
 		/* fallback to PIO */
+		task.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK;
 		ide_tf_set_cmd(drive, &task, 0);
+		hwif->data_phase = task.data_phase;
 		ide_init_sg_cmd(drive, rq);
+		rc = do_rw_taskfile(drive, &task);
 	}
 
-	hwif->data_phase = task.data_phase;
-
-	if (rq_data_dir(rq) == READ) {
-		ide_execute_command(drive, tf->command, &task_in_intr,
-				    WAIT_WORSTCASE, NULL);
-		return ide_started;
-	} else {
-		hwif->OUTBSYNC(drive, tf->command, IDE_COMMAND_REG);
-		ndelay(400);	/* FIXME */
-
-		return pre_task_out_intr(drive, rq);
-	}
+	return rc;
 }
 
 /*
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 236f91f..2d63ea9 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -114,8 +114,6 @@
 		hwif->OUTB((tf->device & HIHI) | drive->select.all, IDE_SELECT_REG);
 }
 
-EXPORT_SYMBOL_GPL(ide_tf_load);
-
 int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf)
 {
 	ide_task_t args;
@@ -133,7 +131,7 @@
 
 static int inline task_dma_ok(ide_task_t *task)
 {
-	if (task->tf_flags & IDE_TFLAG_FLAGGED)
+	if (blk_fs_request(task->rq) || (task->tf_flags & IDE_TFLAG_FLAGGED))
 		return 1;
 
 	switch (task->tf.command) {
@@ -154,6 +152,8 @@
 static ide_startstop_t set_geometry_intr(ide_drive_t *);
 static ide_startstop_t recal_intr(ide_drive_t *);
 static ide_startstop_t set_multmode_intr(ide_drive_t *);
+static ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *);
+static ide_startstop_t task_in_intr(ide_drive_t *);
 
 ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
 {
@@ -173,7 +173,8 @@
 	if (task->tf_flags & IDE_TFLAG_FLAGGED)
 		task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS;
 
-	ide_tf_load(drive, task);
+	if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0)
+		ide_tf_load(drive, task);
 
 	switch (task->data_phase) {
 	case TASKFILE_MULTI_OUT:
@@ -208,6 +209,7 @@
 		return ide_started;
 	}
 }
+EXPORT_SYMBOL_GPL(do_rw_taskfile);
 
 /*
  * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
@@ -446,7 +448,7 @@
 /*
  * Handler for command with PIO data-in phase (Read/Read Multiple).
  */
-ide_startstop_t task_in_intr (ide_drive_t *drive)
+static ide_startstop_t task_in_intr(ide_drive_t *drive)
 {
 	ide_hwif_t *hwif = drive->hwif;
 	struct request *rq = HWGROUP(drive)->rq;
@@ -477,7 +479,6 @@
 
 	return ide_started;
 }
-EXPORT_SYMBOL(task_in_intr);
 
 /*
  * Handler for command with PIO data-out phase (Write/Write Multiple).
@@ -507,7 +508,7 @@
 	return ide_started;
 }
 
-ide_startstop_t pre_task_out_intr (ide_drive_t *drive, struct request *rq)
+static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq)
 {
 	ide_startstop_t startstop;
 
@@ -528,7 +529,6 @@
 
 	return ide_started;
 }
-EXPORT_SYMBOL(pre_task_out_intr);
 
 int ide_raw_taskfile(ide_drive_t *drive, ide_task_t *task, u8 *buf, u16 nsect)
 {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 721c9d8..c333a75 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -912,6 +912,7 @@
 	IDE_TFLAG_FLAGGED_SET_IN_FLAGS	= (1 << 16),
 	IDE_TFLAG_IN_DATA		= (1 << 17),
 	IDE_TFLAG_CUSTOM_HANDLER	= (1 << 18),
+	IDE_TFLAG_DMA_PIO_FALLBACK	= (1 << 19),
 };
 
 struct ide_taskfile {
@@ -965,13 +966,7 @@
 
 void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
 
-/*
- * taskfile io for disks for now...and builds request from ide_ioctl
- */
-extern ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
-
-extern ide_startstop_t task_in_intr(ide_drive_t *);
-extern ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *);
+ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
 
 int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16);
 int ide_no_data_taskfile(ide_drive_t *, ide_task_t *);
