]> err.no Git - linux-2.6/commitdiff
ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)
Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-disk.c

index fc785e760bd861b9f4dfba81e9502877e12a8bdc..ffff96e6ab3ebcfdf5f4aa72d8371af62bbc56ee 100644 (file)
@@ -601,19 +601,21 @@ static ide_proc_entry_t idedisk_proc[] = {
 static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
 {
        ide_drive_t *drive = q->queuedata;
+       ide_task_t task;
 
-       memset(rq->cmd, 0, sizeof(rq->cmd));
-
+       memset(&task, 0, sizeof(task));
        if (ide_id_has_flush_cache_ext(drive->id) &&
            (drive->capacity64 >= (1UL << 28)))
-               rq->cmd[0] = WIN_FLUSH_CACHE_EXT;
+               task.tf.command = WIN_FLUSH_CACHE_EXT;
        else
-               rq->cmd[0] = WIN_FLUSH_CACHE;
-
+               task.tf.command = WIN_FLUSH_CACHE;
+       task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE;
+       task.command_type = IDE_DRIVE_TASK_NO_DATA;
+       task.handler = task_no_data_intr;
 
-       rq->cmd_type = REQ_TYPE_ATA_TASK;
+       rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
        rq->cmd_flags |= REQ_SOFTBARRIER;
-       rq->buffer = rq->cmd;
+       rq->special = &task;
 }
 
 /*