diff options
-rw-r--r-- | drivers/ide/ide-io.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 7 | ||||
-rw-r--r-- | drivers/ide/ide-lib.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 2 | ||||
-rw-r--r-- | include/linux/ide.h | 8 |
5 files changed, 14 insertions, 9 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 5b675a001382..8d7c1a09e1e7 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -330,7 +330,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
330 | tf->error = err; | 330 | tf->error = err; |
331 | tf->status = stat; | 331 | tf->status = stat; |
332 | 332 | ||
333 | ide_tf_read(drive, task); | 333 | drive->hwif->tf_read(drive, task); |
334 | 334 | ||
335 | if (task->tf_flags & IDE_TFLAG_DYN) | 335 | if (task->tf_flags & IDE_TFLAG_DYN) |
336 | kfree(task); | 336 | kfree(task); |
@@ -1638,7 +1638,7 @@ void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount, u8 dma) | |||
1638 | task.tf.lbah = (bcount >> 8) & 0xff; | 1638 | task.tf.lbah = (bcount >> 8) & 0xff; |
1639 | 1639 | ||
1640 | ide_tf_dump(drive->name, &task.tf); | 1640 | ide_tf_dump(drive->name, &task.tf); |
1641 | ide_tf_load(drive, &task); | 1641 | drive->hwif->tf_load(drive, &task); |
1642 | } | 1642 | } |
1643 | 1643 | ||
1644 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); | 1644 | EXPORT_SYMBOL_GPL(ide_pktcmd_tf_load); |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index ac9e063bcf93..65275454a209 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -127,7 +127,7 @@ void SELECT_MASK (ide_drive_t *drive, int mask) | |||
127 | port_ops->maskproc(drive, mask); | 127 | port_ops->maskproc(drive, mask); |
128 | } | 128 | } |
129 | 129 | ||
130 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 130 | static void ide_tf_load(ide_drive_t *drive, ide_task_t *task) |
131 | { | 131 | { |
132 | ide_hwif_t *hwif = drive->hwif; | 132 | ide_hwif_t *hwif = drive->hwif; |
133 | struct ide_io_ports *io_ports = &hwif->io_ports; | 133 | struct ide_io_ports *io_ports = &hwif->io_ports; |
@@ -172,7 +172,7 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
172 | io_ports->device_addr); | 172 | io_ports->device_addr); |
173 | } | 173 | } |
174 | 174 | ||
175 | void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | 175 | static void ide_tf_read(ide_drive_t *drive, ide_task_t *task) |
176 | { | 176 | { |
177 | ide_hwif_t *hwif = drive->hwif; | 177 | ide_hwif_t *hwif = drive->hwif; |
178 | struct ide_io_ports *io_ports = &hwif->io_ports; | 178 | struct ide_io_ports *io_ports = &hwif->io_ports; |
@@ -323,6 +323,9 @@ static void ata_output_data(ide_drive_t *drive, struct request *rq, | |||
323 | 323 | ||
324 | void default_hwif_transport(ide_hwif_t *hwif) | 324 | void default_hwif_transport(ide_hwif_t *hwif) |
325 | { | 325 | { |
326 | hwif->tf_load = ide_tf_load; | ||
327 | hwif->tf_read = ide_tf_read; | ||
328 | |||
326 | hwif->input_data = ata_input_data; | 329 | hwif->input_data = ata_input_data; |
327 | hwif->output_data = ata_output_data; | 330 | hwif->output_data = ata_output_data; |
328 | } | 331 | } |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 6f04ea3e93a8..47af80df6872 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -487,7 +487,7 @@ static void ide_dump_sector(ide_drive_t *drive) | |||
487 | else | 487 | else |
488 | task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE; | 488 | task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE; |
489 | 489 | ||
490 | ide_tf_read(drive, &task); | 490 | drive->hwif->tf_read(drive, &task); |
491 | 491 | ||
492 | if (lba48 || (tf->device & ATA_LBA)) | 492 | if (lba48 || (tf->device & ATA_LBA)) |
493 | printk(", LBAsect=%llu", | 493 | printk(", LBAsect=%llu", |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 9ec3ecd4a3a5..9a846a0cd5a4 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -109,7 +109,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
109 | 109 | ||
110 | if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) { | 110 | if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) { |
111 | ide_tf_dump(drive->name, tf); | 111 | ide_tf_dump(drive->name, tf); |
112 | ide_tf_load(drive, task); | 112 | hwif->tf_load(drive, task); |
113 | } | 113 | } |
114 | 114 | ||
115 | switch (task->data_phase) { | 115 | switch (task->data_phase) { |
diff --git a/include/linux/ide.h b/include/linux/ide.h index d7d8bb69db4b..8e95579c3d34 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -427,6 +427,8 @@ struct ide_dma_ops { | |||
427 | void (*dma_timeout)(struct ide_drive_s *); | 427 | void (*dma_timeout)(struct ide_drive_s *); |
428 | }; | 428 | }; |
429 | 429 | ||
430 | struct ide_task_s; | ||
431 | |||
430 | typedef struct hwif_s { | 432 | typedef struct hwif_s { |
431 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 433 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
432 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 434 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
@@ -467,6 +469,9 @@ typedef struct hwif_s { | |||
467 | const struct ide_port_ops *port_ops; | 469 | const struct ide_port_ops *port_ops; |
468 | const struct ide_dma_ops *dma_ops; | 470 | const struct ide_dma_ops *dma_ops; |
469 | 471 | ||
472 | void (*tf_load)(ide_drive_t *, struct ide_task_s *); | ||
473 | void (*tf_read)(ide_drive_t *, struct ide_task_s *); | ||
474 | |||
470 | void (*input_data)(ide_drive_t *, struct request *, void *, unsigned); | 475 | void (*input_data)(ide_drive_t *, struct request *, void *, unsigned); |
471 | void (*output_data)(ide_drive_t *, struct request *, void *, unsigned); | 476 | void (*output_data)(ide_drive_t *, struct request *, void *, unsigned); |
472 | 477 | ||
@@ -962,9 +967,6 @@ typedef struct ide_task_s { | |||
962 | 967 | ||
963 | void ide_tf_dump(const char *, struct ide_taskfile *); | 968 | void ide_tf_dump(const char *, struct ide_taskfile *); |
964 | 969 | ||
965 | void ide_tf_load(ide_drive_t *, ide_task_t *); | ||
966 | void ide_tf_read(ide_drive_t *, ide_task_t *); | ||
967 | |||
968 | extern void SELECT_DRIVE(ide_drive_t *); | 970 | extern void SELECT_DRIVE(ide_drive_t *); |
969 | extern void SELECT_MASK(ide_drive_t *, int); | 971 | extern void SELECT_MASK(ide_drive_t *, int); |
970 | 972 | ||