aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index e9d042dba0e0..09ae30f46070 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -456,6 +456,25 @@ next_irq:
456 return ide_started; 456 return ide_started;
457} 457}
458 458
459static void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount)
460{
461 ide_hwif_t *hwif = drive->hwif;
462 ide_task_t task;
463 u8 dma = drive->dma;
464
465 memset(&task, 0, sizeof(task));
466 task.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM |
467 IDE_TFLAG_OUT_FEATURE | tf_flags;
468 task.tf.feature = dma; /* Use PIO/DMA */
469 task.tf.lbam = bcount & 0xff;
470 task.tf.lbah = (bcount >> 8) & 0xff;
471
472 ide_tf_dump(drive->name, &task.tf);
473 hwif->tp_ops->set_irq(hwif, 1);
474 SELECT_MASK(drive, 0);
475 hwif->tp_ops->tf_load(drive, &task);
476}
477
459static u8 ide_read_ireason(ide_drive_t *drive) 478static u8 ide_read_ireason(ide_drive_t *drive)
460{ 479{
461 ide_task_t task; 480 ide_task_t task;
@@ -629,7 +648,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive)
629 : WAIT_TAPE_CMD; 648 : WAIT_TAPE_CMD;
630 } 649 }
631 650
632 ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma); 651 ide_pktcmd_tf_load(drive, tf_flags, bcount);
633 652
634 /* Issue the packet command */ 653 /* Issue the packet command */
635 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { 654 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {