diff options
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 1481f71f8173..89d2339bdef3 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -638,7 +638,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd) | |||
638 | { | 638 | { |
639 | struct ide_atapi_pc *pc; | 639 | struct ide_atapi_pc *pc; |
640 | ide_hwif_t *hwif = drive->hwif; | 640 | ide_hwif_t *hwif = drive->hwif; |
641 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; | ||
642 | ide_expiry_t *expiry = NULL; | 641 | ide_expiry_t *expiry = NULL; |
643 | struct request *rq = hwif->rq; | 642 | struct request *rq = hwif->rq; |
644 | unsigned int timeout; | 643 | unsigned int timeout; |
@@ -652,12 +651,8 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd) | |||
652 | expiry = ide_cd_expiry; | 651 | expiry = ide_cd_expiry; |
653 | timeout = ATAPI_WAIT_PC; | 652 | timeout = ATAPI_WAIT_PC; |
654 | 653 | ||
655 | if (drive->dma) { | 654 | if (drive->dma) |
656 | if (ide_build_sglist(drive, cmd)) | 655 | drive->dma = !ide_dma_prepare(drive, cmd); |
657 | drive->dma = !dma_ops->dma_setup(drive, cmd); | ||
658 | else | ||
659 | drive->dma = 0; | ||
660 | } | ||
661 | } else { | 656 | } else { |
662 | pc = drive->pc; | 657 | pc = drive->pc; |
663 | 658 | ||
@@ -675,13 +670,8 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd) | |||
675 | ide_dma_off(drive); | 670 | ide_dma_off(drive); |
676 | } | 671 | } |
677 | 672 | ||
678 | if ((pc->flags & PC_FLAG_DMA_OK) && | 673 | if (pc->flags & PC_FLAG_DMA_OK) |
679 | (drive->dev_flags & IDE_DFLAG_USING_DMA)) { | 674 | drive->dma = !ide_dma_prepare(drive, cmd); |
680 | if (ide_build_sglist(drive, cmd)) | ||
681 | drive->dma = !dma_ops->dma_setup(drive, cmd); | ||
682 | else | ||
683 | drive->dma = 0; | ||
684 | } | ||
685 | 675 | ||
686 | if (!drive->dma) | 676 | if (!drive->dma) |
687 | pc->flags &= ~PC_FLAG_DMA_OK; | 677 | pc->flags &= ~PC_FLAG_DMA_OK; |