diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index fc785e760bd8..ffff96e6ab3e 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -601,19 +601,21 @@ static ide_proc_entry_t idedisk_proc[] = { | |||
601 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) | 601 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) |
602 | { | 602 | { |
603 | ide_drive_t *drive = q->queuedata; | 603 | ide_drive_t *drive = q->queuedata; |
604 | ide_task_t task; | ||
604 | 605 | ||
605 | memset(rq->cmd, 0, sizeof(rq->cmd)); | 606 | memset(&task, 0, sizeof(task)); |
606 | |||
607 | if (ide_id_has_flush_cache_ext(drive->id) && | 607 | if (ide_id_has_flush_cache_ext(drive->id) && |
608 | (drive->capacity64 >= (1UL << 28))) | 608 | (drive->capacity64 >= (1UL << 28))) |
609 | rq->cmd[0] = WIN_FLUSH_CACHE_EXT; | 609 | task.tf.command = WIN_FLUSH_CACHE_EXT; |
610 | else | 610 | else |
611 | rq->cmd[0] = WIN_FLUSH_CACHE; | 611 | task.tf.command = WIN_FLUSH_CACHE; |
612 | 612 | task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; | |
613 | task.command_type = IDE_DRIVE_TASK_NO_DATA; | ||
614 | task.handler = task_no_data_intr; | ||
613 | 615 | ||
614 | rq->cmd_type = REQ_TYPE_ATA_TASK; | 616 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
615 | rq->cmd_flags |= REQ_SOFTBARRIER; | 617 | rq->cmd_flags |= REQ_SOFTBARRIER; |
616 | rq->buffer = rq->cmd; | 618 | rq->special = &task; |
617 | } | 619 | } |
618 | 620 | ||
619 | /* | 621 | /* |