aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:13 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:13 -0500
commit2fc573881957337c4ea1c84b92d2f27d076cad57 (patch)
tree790726063934a7ea8c384f2314d44bc03b22f779 /drivers/ide/ide-tape.c
parent932aead6d21b631b2058255981824008a6eae32e (diff)
ide: add ide_pktcmd_tf_load() helper
Add ide_pktcmd_tf_load() helper and convert ATAPI device drivers to use it. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index d1f2446739a4..3cbca3f4628a 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2171,12 +2171,9 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
2171 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) 2171 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
2172 dma_ok = !hwif->dma_setup(drive); 2172 dma_ok = !hwif->dma_setup(drive);
2173 2173
2174 if (IDE_CONTROL_REG) 2174 ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK |
2175 hwif->OUTB(drive->ctl, IDE_CONTROL_REG); 2175 IDE_TFLAG_OUT_DEVICE, bcount, dma_ok);
2176 hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG); /* Use PIO/DMA */ 2176
2177 hwif->OUTB(bcount & 0xff, IDE_BCOUNTL_REG);
2178 hwif->OUTB((bcount >> 8) & 0xff, IDE_BCOUNTH_REG);
2179 hwif->OUTB(drive->select.all, IDE_SELECT_REG);
2180 if (dma_ok) /* Will begin DMA later */ 2177 if (dma_ok) /* Will begin DMA later */
2181 set_bit(PC_DMA_IN_PROGRESS, &pc->flags); 2178 set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
2182 if (test_bit(IDETAPE_DRQ_INTERRUPT, &tape->flags)) { 2179 if (test_bit(IDETAPE_DRQ_INTERRUPT, &tape->flags)) {