Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[pandora-kernel.git] / drivers / ide / ide-disk.c
index 3c69822..39501d1 100644 (file)
@@ -397,6 +397,7 @@ static inline int idedisk_supports_lba48(const struct hd_driveid *id)
 static const struct drive_list_entry hpa_list[] = {
        { "ST340823A",  NULL },
        { "ST320413A",  NULL },
+       { "ST310211A",  NULL },
        { NULL,         NULL }
 };
 
@@ -590,20 +591,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;
 }
 
 /*
@@ -862,7 +867,7 @@ static void idedisk_setup (ide_drive_t *drive)
 
        /* Only print cache size when it was specified */
        if (id->buf_size)
-               printk (" w/%dKiB Cache", id->buf_size/2);
+               printk(KERN_CONT " w/%dKiB Cache", id->buf_size / 2);
 
        printk(KERN_CONT ", CHS=%d/%d/%d\n",
                         drive->bios_cyl, drive->bios_head, drive->bios_sect);
@@ -944,7 +949,8 @@ static void ide_device_shutdown(ide_drive_t *drive)
                return;
        }
 
-       printk("Shutdown: %s\n", drive->name);
+       printk(KERN_INFO "Shutdown: %s\n", drive->name);
+
        drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND);
 }