summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 19:55:52 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 19:55:52 +0200
commit59be2c80f0c1080634006135aa9130f1736fbfba (patch)
tree4be8174786b93a0c7deab17aa5155c3c0e192b44 /drivers/ide
parent3c09384e95fa4048a06f179849901f3e57266d58 (diff)
downloadop-kernel-dev-59be2c80f0c1080634006135aa9130f1736fbfba.zip
op-kernel-dev-59be2c80f0c1080634006135aa9130f1736fbfba.tar.gz
ide: use ->tf_load in ide_config_drive_speed()
Convert ide_config_drive_speed() to use ->tf_load instead of ->OUTB. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-iops.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 0a3a506..a15f1e1 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -792,9 +792,9 @@ int ide_driveid_update(ide_drive_t *drive)
int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
{
ide_hwif_t *hwif = drive->hwif;
- struct ide_io_ports *io_ports = &hwif->io_ports;
int error = 0;
u8 stat;
+ ide_task_t task;
#ifdef CONFIG_BLK_DEV_IDEDMA
if (hwif->dma_ops) /* check if host supports DMA */
@@ -828,9 +828,16 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
SELECT_MASK(drive, 0);
udelay(1);
hwif->set_irq(hwif, 0);
- hwif->OUTB(SETFEATURES_XFER, io_ports->feature_addr);
- hwif->OUTB(speed, io_ports->nsect_addr);
+
+ memset(&task, 0, sizeof(task));
+ task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT;
+ task.tf.feature = SETFEATURES_XFER;
+ task.tf.nsect = speed;
+
+ hwif->tf_load(drive, &task);
+
hwif->exec_command(hwif, WIN_SETFEATURES);
+
if (drive->quirk_list == 2)
hwif->set_irq(hwif, 1);
OpenPOWER on IntegriCloud