diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-io.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 29 |
2 files changed, 18 insertions, 12 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c32ca769b963..a6f2186773fa 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -1680,6 +1680,7 @@ void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | |||
1680 | task.tf.lbam = bcount & 0xff; | 1680 | task.tf.lbam = bcount & 0xff; |
1681 | task.tf.lbah = (bcount >> 8) & 0xff; | 1681 | task.tf.lbah = (bcount >> 8) & 0xff; |
1682 | 1682 | ||
1683 | ide_tf_dump(drive->name, &task.tf); | ||
1683 | ide_tf_load(drive, &task); | 1684 | ide_tf_load(drive, &task); |
1684 | } | 1685 | } |
1685 | 1686 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 0321884f9d92..416ce54af7ad 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -33,26 +33,29 @@ | |||
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | 35 | ||
36 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 36 | void ide_tf_dump(const char *s, struct ide_taskfile *tf) |
37 | { | 37 | { |
38 | ide_hwif_t *hwif = drive->hwif; | ||
39 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
40 | struct ide_taskfile *tf = &task->tf; | ||
41 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | ||
42 | |||
43 | if (task->tf_flags & IDE_TFLAG_FLAGGED) | ||
44 | HIHI = 0xFF; | ||
45 | |||
46 | #ifdef DEBUG | 38 | #ifdef DEBUG |
47 | printk("%s: tf: feat 0x%02x nsect 0x%02x lbal 0x%02x " | 39 | printk("%s: tf: feat 0x%02x nsect 0x%02x lbal 0x%02x " |
48 | "lbam 0x%02x lbah 0x%02x dev 0x%02x cmd 0x%02x\n", | 40 | "lbam 0x%02x lbah 0x%02x dev 0x%02x cmd 0x%02x\n", |
49 | drive->name, tf->feature, tf->nsect, tf->lbal, | 41 | s, tf->feature, tf->nsect, tf->lbal, |
50 | tf->lbam, tf->lbah, tf->device, tf->command); | 42 | tf->lbam, tf->lbah, tf->device, tf->command); |
51 | printk("%s: hob: nsect 0x%02x lbal 0x%02x " | 43 | printk("%s: hob: nsect 0x%02x lbal 0x%02x " |
52 | "lbam 0x%02x lbah 0x%02x\n", | 44 | "lbam 0x%02x lbah 0x%02x\n", |
53 | drive->name, tf->hob_nsect, tf->hob_lbal, | 45 | s, tf->hob_nsect, tf->hob_lbal, |
54 | tf->hob_lbam, tf->hob_lbah); | 46 | tf->hob_lbam, tf->hob_lbah); |
55 | #endif | 47 | #endif |
48 | } | ||
49 | |||
50 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | ||
51 | { | ||
52 | ide_hwif_t *hwif = drive->hwif; | ||
53 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
54 | struct ide_taskfile *tf = &task->tf; | ||
55 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | ||
56 | |||
57 | if (task->tf_flags & IDE_TFLAG_FLAGGED) | ||
58 | HIHI = 0xFF; | ||
56 | 59 | ||
57 | ide_set_irq(drive, 1); | 60 | ide_set_irq(drive, 1); |
58 | 61 | ||
@@ -149,8 +152,10 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
149 | if (task->tf_flags & IDE_TFLAG_FLAGGED) | 152 | if (task->tf_flags & IDE_TFLAG_FLAGGED) |
150 | task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS; | 153 | task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS; |
151 | 154 | ||
152 | if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) | 155 | if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) { |
156 | ide_tf_dump(drive->name, tf); | ||
153 | ide_tf_load(drive, task); | 157 | ide_tf_load(drive, task); |
158 | } | ||
154 | 159 | ||
155 | switch (task->data_phase) { | 160 | switch (task->data_phase) { |
156 | case TASKFILE_MULTI_OUT: | 161 | case TASKFILE_MULTI_OUT: |