aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-dma.c8
-rw-r--r--drivers/ide/ide-taskfile.c11
-rw-r--r--include/linux/ide.h2
3 files changed, 7 insertions, 14 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index c9648b1ef220..5bf32038dc43 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -153,13 +153,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
153 if (!dma_stat) { 153 if (!dma_stat) {
154 struct request *rq = HWGROUP(drive)->rq; 154 struct request *rq = HWGROUP(drive)->rq;
155 155
156 if (rq->rq_disk) { 156 task_end_request(drive, rq, stat);
157 ide_driver_t *drv;
158
159 drv = *(ide_driver_t **)rq->rq_disk->private_data;
160 drv->end_request(drive, 1, rq->nr_sectors);
161 } else
162 ide_end_request(drive, 1, rq->nr_sectors);
163 return ide_stopped; 157 return ide_stopped;
164 } 158 }
165 printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n", 159 printk(KERN_ERR "%s: dma_intr: bad DMA status (dma_stat=%x)\n",
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 3bbb438f4f92..17c2c0467297 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -408,16 +408,13 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
408 return ide_error(drive, s, stat); 408 return ide_error(drive, s, stat);
409} 409}
410 410
411static void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) 411void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
412{ 412{
413 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { 413 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
414 ide_task_t *task = rq->special; 414 u8 err = drive->hwif->INB(IDE_ERROR_REG);
415 415
416 if (task->tf_flags & IDE_TFLAG_FLAGGED) { 416 ide_end_drive_cmd(drive, stat, err);
417 u8 err = drive->hwif->INB(IDE_ERROR_REG); 417 return;
418 ide_end_drive_cmd(drive, stat, err);
419 return;
420 }
421 } 418 }
422 419
423 if (rq->rq_disk) { 420 if (rq->rq_disk) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 02493dbb156d..6192564fcc5a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -993,6 +993,8 @@ void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
993 993
994ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); 994ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
995 995
996void task_end_request(ide_drive_t *, struct request *, u8);
997
996int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); 998int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16);
997int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); 999int ide_no_data_taskfile(ide_drive_t *, ide_task_t *);
998 1000