summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-11 09:19:22 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-11 09:19:22 -0800
commiteedcdefb1ad75de9cc0889b247524be64cc244ef (patch)
tree763c742fe2ef0f109af364fca266f022739ef8bc /drivers/ide/ide-disk.c
parent9585ca02f8f9e844b64e7ff4d167ccc1390a99ab (diff)
parent467390a2a50493332ddc21eb806094b1829c1161 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: ide: remove stale comment from ide-lib.c ide: fix comment in init_irq() ide: ide_init_port() bugfix ide-disk: fix flush requests (take 2) ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option bast-ide: build fix ide-tape: remove never executed code ide: fix ide/legacy/gayle.c compilation ide-cd: replace ntohs with generic byteorder macro be16_to_cpu ide: remove stale version number pdc202xx_old: always enable burst mode palm_bk3710: use struct ide_port_info palm_bk3710: port initialization/probing bugfix palm_bk3710: fix ide_unregister() usage palm_bk3710: ide_register_hw() -> ide_device_add() ide: insert BUG_ON() into __ide_set_handler() (take 2) cs5520: remove stale comment ide: another possible ide panic fix for blk-end-request
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 3c69822507e2..aed8b31ca561 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -590,20 +590,24 @@ 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;
+ ide_task_t *task = kmalloc(sizeof(*task), GFP_ATOMIC);
- memset(&task, 0, sizeof(task));
+ /* FIXME: map struct ide_taskfile on rq->cmd[] */
+ BUG_ON(task == NULL);
+
+ memset(task, 0, sizeof(*task));
if (ide_id_has_flush_cache_ext(drive->id) &&
(drive->capacity64 >= (1UL << 28)))
- task.tf.command = WIN_FLUSH_CACHE_EXT;
+ task->tf.command = WIN_FLUSH_CACHE_EXT;
else
- task.tf.command = WIN_FLUSH_CACHE;
- task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE;
- task.data_phase = TASKFILE_NO_DATA;
+ task->tf.command = WIN_FLUSH_CACHE;
+ task->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE |
+ IDE_TFLAG_DYN;
+ task->data_phase = TASKFILE_NO_DATA;
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
rq->cmd_flags |= REQ_SOFTBARRIER;
- rq->special = &task;
+ rq->special = task;
}
/*