diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-26 16:44:19 -0400 |
| commit | a52b0d25a722e84da999005b75f972aa4824253c (patch) | |
| tree | 4a3a48305f744e6bde2e3fd663a4473dd712049c /drivers/ide/ide-taskfile.c | |
| parent | 539a5fe22620a1665cce504167953a71a43232ad (diff) | |
| parent | f37afdaca711838b50ecd89b9c15fc745270d77c (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (46 commits)
ide: constify struct ide_dma_ops
ide: add struct ide_dma_ops (take 3)
ide: add IDE_HFLAG_SERIALIZE_DMA host flag
sl82c105: check bridge revision in sl82c105_init_one()
au1xxx-ide: use ->init_dma method
palm_bk3710: use ->init_dma method
sgiioc4: use ->init_dma method
icside: use ->init_dma method
ide-pmac: use ->init_dma method
ide: do complete DMA setup in ->init_dma method (take 2)
au1xxx-ide: fix MWDMA support
ide: cleanup ide_setup_dma()
ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma()
ide: export ide_allocate_dma_engine()
ide: move ide_setup_dma() call out from ->init_dma method
alim15x3: skip DMA initialization completely on revs < 0x20
pdc202xx_old: remove init_dma_pdc202xx()
ide: don't display "BIOS" settings in ide_setup_dma()
ide: remove ->cds field from ide_hwif_t (take 2)
ide: remove ide_dma_iobase()
...
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 | } |
