diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:13 -0500 |
commit | 2fc573881957337c4ea1c84b92d2f27d076cad57 (patch) | |
tree | 790726063934a7ea8c384f2314d44bc03b22f779 /drivers/ide/ide-io.c | |
parent | 932aead6d21b631b2058255981824008a6eae32e (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-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index d36df77c7519..1ed7a8627cca 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -1734,3 +1734,19 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio | |||
1734 | } | 1734 | } |
1735 | 1735 | ||
1736 | EXPORT_SYMBOL(ide_do_drive_cmd); | 1736 | EXPORT_SYMBOL(ide_do_drive_cmd); |
1737 | |||
1738 | void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | ||
1739 | { | ||
1740 | ide_task_t task; | ||
1741 | |||
1742 | memset(&task, 0, sizeof(task)); | ||
1743 | task.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | | ||
1744 | IDE_TFLAG_OUT_FEATURE | tf_flags; | ||
1745 | task.tf.feature = dma; /* Use PIO/DMA */ | ||
1746 | task.tf.lbam = bcount & 0xff; | ||
1747 | task.tf.lbah = (bcount >> 8) & 0xff; | ||
1748 | |||
1749 | ide_tf_load(drive, &task); | ||
1750 | } | ||
1751 | |||
1752 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); | ||