Re: [PATCH 2.6.11-rc3 06/08] ide: convert set_xfer_rate() to use taskfile ioctl

From: Tejun Heo
Date: Fri Mar 04 2005 - 21:52:17 EST



06_ide_taskfile_set_xfer_rate.patch

Convert set_xfer_rate() to use taskfile ioctl.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

ide.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)

Index: linux-taskfile-ng/drivers/ide/ide.c
===================================================================
--- linux-taskfile-ng.orig/drivers/ide/ide.c 2005-03-05 10:37:51.451393268 +0900
+++ linux-taskfile-ng/drivers/ide/ide.c 2005-03-05 10:46:59.933824315 +0900
@@ -1250,10 +1250,19 @@ static int set_pio_mode (ide_drive_t *dr

static int set_xfer_rate (ide_drive_t *drive, int arg)
{
- int err = ide_wait_cmd(drive,
- WIN_SETFEATURES, (u8) arg,
- SETFEATURES_XFER, 0, NULL);
+ ide_task_t task;
+ struct ata_taskfile *tf = &task.tf;
+ int err;
+
+ memset(&task, 0, sizeof(task));
+
+ tf->protocol = ATA_PROT_NODATA;
+ tf->flags = ATA_TFLAG_OUT_ADDR;
+ tf->feature = SETFEATURES_XFER;
+ tf->nsect = arg;
+ tf->command = WIN_SETFEATURES;

+ err = ide_raw_taskfile(drive, &task, 0, NULL);
if (!err && arg) {
ide_set_xfer_rate(drive, (u8) arg);
ide_driveid_update(drive);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/