From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Zolnierkiewicz Subject: [PATCH 11/18] ide: use ->tf_load in ide_config_drive_speed() Date: Fri, 20 Jun 2008 23:34:38 +0200 Message-ID: <20080620213438.13202.76315.sendpatchset@localhost.localdomain> References: <20080620213323.13202.71450.sendpatchset@localhost.localdomain> Return-path: Received: from fg-out-1718.google.com ([72.14.220.153]:22386 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761572AbYFTVcm (ORCPT ); Fri, 20 Jun 2008 17:32:42 -0400 Received: by fg-out-1718.google.com with SMTP id 19so745051fgg.17 for ; Fri, 20 Jun 2008 14:32:41 -0700 (PDT) In-Reply-To: <20080620213323.13202.71450.sendpatchset@localhost.localdomain> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org 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 --- drivers/ide/ide-iops.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) Index: b/drivers/ide/ide-iops.c =================================================================== --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -792,9 +792,9 @@ int ide_driveid_update(ide_drive_t *driv 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 * 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);