diff options
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
| -rw-r--r-- | drivers/ide/ide-taskfile.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 155cc904f4eb..a317ca9c46e5 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
| @@ -135,6 +135,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
| 135 | ide_hwif_t *hwif = HWIF(drive); | 135 | ide_hwif_t *hwif = HWIF(drive); |
| 136 | struct ide_taskfile *tf = &task->tf; | 136 | struct ide_taskfile *tf = &task->tf; |
| 137 | ide_handler_t *handler = NULL; | 137 | ide_handler_t *handler = NULL; |
| 138 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; | ||
| 138 | 139 | ||
| 139 | if (task->data_phase == TASKFILE_MULTI_IN || | 140 | if (task->data_phase == TASKFILE_MULTI_IN || |
| 140 | task->data_phase == TASKFILE_MULTI_OUT) { | 141 | task->data_phase == TASKFILE_MULTI_OUT) { |
| @@ -178,10 +179,10 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
| 178 | return ide_started; | 179 | return ide_started; |
| 179 | default: | 180 | default: |
| 180 | if (task_dma_ok(task) == 0 || drive->using_dma == 0 || | 181 | if (task_dma_ok(task) == 0 || drive->using_dma == 0 || |
| 181 | hwif->dma_setup(drive)) | 182 | dma_ops->dma_setup(drive)) |
| 182 | return ide_stopped; | 183 | return ide_stopped; |
| 183 | hwif->dma_exec_cmd(drive, tf->command); | 184 | dma_ops->dma_exec_cmd(drive, tf->command); |
| 184 | hwif->dma_start(drive); | 185 | dma_ops->dma_start(drive); |
| 185 | return ide_started; | 186 | return ide_started; |
| 186 | } | 187 | } |
| 187 | } | 188 | } |
| @@ -455,7 +456,7 @@ static ide_startstop_t task_in_intr(ide_drive_t *drive) | |||
| 455 | 456 | ||
| 456 | /* Error? */ | 457 | /* Error? */ |
| 457 | if (stat & ERR_STAT) | 458 | if (stat & ERR_STAT) |
| 458 | return task_error(drive, rq, __FUNCTION__, stat); | 459 | return task_error(drive, rq, __func__, stat); |
| 459 | 460 | ||
| 460 | /* Didn't want any data? Odd. */ | 461 | /* Didn't want any data? Odd. */ |
| 461 | if (!(stat & DRQ_STAT)) | 462 | if (!(stat & DRQ_STAT)) |
| @@ -467,7 +468,7 @@ static ide_startstop_t task_in_intr(ide_drive_t *drive) | |||
| 467 | if (!hwif->nleft) { | 468 | if (!hwif->nleft) { |
| 468 | stat = wait_drive_not_busy(drive); | 469 | stat = wait_drive_not_busy(drive); |
| 469 | if (!OK_STAT(stat, 0, BAD_STAT)) | 470 | if (!OK_STAT(stat, 0, BAD_STAT)) |
| 470 | return task_error(drive, rq, __FUNCTION__, stat); | 471 | return task_error(drive, rq, __func__, stat); |
| 471 | task_end_request(drive, rq, stat); | 472 | task_end_request(drive, rq, stat); |
| 472 | return ide_stopped; | 473 | return ide_stopped; |
| 473 | } | 474 | } |
| @@ -488,11 +489,11 @@ static ide_startstop_t task_out_intr (ide_drive_t *drive) | |||
| 488 | u8 stat = ide_read_status(drive); | 489 | u8 stat = ide_read_status(drive); |
| 489 | 490 | ||
| 490 | if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat)) | 491 | if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat)) |
| 491 | return task_error(drive, rq, __FUNCTION__, stat); | 492 | return task_error(drive, rq, __func__, stat); |
| 492 | 493 | ||
| 493 | /* Deal with unexpected ATA data phase. */ | 494 | /* Deal with unexpected ATA data phase. */ |
| 494 | if (((stat & DRQ_STAT) == 0) ^ !hwif->nleft) | 495 | if (((stat & DRQ_STAT) == 0) ^ !hwif->nleft) |
| 495 | return task_error(drive, rq, __FUNCTION__, stat); | 496 | return task_error(drive, rq, __func__, stat); |
| 496 | 497 | ||
| 497 | if (!hwif->nleft) { | 498 | if (!hwif->nleft) { |
| 498 | task_end_request(drive, rq, stat); | 499 | task_end_request(drive, rq, stat); |
| @@ -675,7 +676,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | |||
| 675 | /* (hs): give up if multcount is not set */ | 676 | /* (hs): give up if multcount is not set */ |
| 676 | printk(KERN_ERR "%s: %s Multimode Write " \ | 677 | printk(KERN_ERR "%s: %s Multimode Write " \ |
| 677 | "multcount is not set\n", | 678 | "multcount is not set\n", |
| 678 | drive->name, __FUNCTION__); | 679 | drive->name, __func__); |
| 679 | err = -EPERM; | 680 | err = -EPERM; |
| 680 | goto abort; | 681 | goto abort; |
| 681 | } | 682 | } |
| @@ -692,7 +693,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | |||
| 692 | /* (hs): give up if multcount is not set */ | 693 | /* (hs): give up if multcount is not set */ |
| 693 | printk(KERN_ERR "%s: %s Multimode Read failure " \ | 694 | printk(KERN_ERR "%s: %s Multimode Read failure " \ |
| 694 | "multcount is not set\n", | 695 | "multcount is not set\n", |
| 695 | drive->name, __FUNCTION__); | 696 | drive->name, __func__); |
| 696 | err = -EPERM; | 697 | err = -EPERM; |
| 697 | goto abort; | 698 | goto abort; |
| 698 | } | 699 | } |
