This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / ide / ide-tape.c
index 7ba9c9b..9d19fab 100644 (file)
 #include <linux/ide.h>
 #include <linux/smp_lock.h>
 #include <linux/completion.h>
-#include <linux/bitops.h>
 
 #include <asm/byteorder.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/unaligned.h>
+#include <asm/bitops.h>
 
 /*
  * partition
@@ -2067,7 +2067,7 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
 #ifdef CONFIG_BLK_DEV_IDEDMA
        /* Begin DMA, if necessary */
        if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags))
-               hwif->ide_dma_start(drive);
+               (void) (HWIF(drive)->ide_dma_begin(drive));
 #endif
        /* Send the actual packet */
        HWIF(drive)->atapi_output_bytes(drive, pc->c, 12);
@@ -2135,8 +2135,12 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
                                "reverting to PIO\n");
                (void)__ide_dma_off(drive);
        }
-       if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
-               dma_ok = !hwif->ide_dma_setup(drive);
+       if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) {
+               if (test_bit(PC_WRITING, &pc->flags))
+                       dma_ok = !HWIF(drive)->ide_dma_write(drive);
+               else
+                       dma_ok = !HWIF(drive)->ide_dma_read(drive);
+       }
 
        if (IDE_CONTROL_REG)
                hwif->OUTB(drive->ctl, IDE_CONTROL_REG);