Source
427
427
drive->dev_flags |= IDE_DFLAG_NOHPA; /* disable HPA on resume */
428
428
}
429
429
430
430
static bool idedisk_prep_rq(ide_drive_t *drive, struct request *rq)
431
431
{
432
432
struct ide_cmd *cmd;
433
433
434
434
if (req_op(rq) != REQ_OP_FLUSH)
435
435
return true;
436
436
437
-
if (rq->special) {
438
-
cmd = rq->special;
437
+
if (ide_req(rq)->special) {
438
+
cmd = ide_req(rq)->special;
439
439
memset(cmd, 0, sizeof(*cmd));
440
440
} else {
441
441
cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
442
442
}
443
443
444
444
/* FIXME: map struct ide_taskfile on rq->cmd[] */
445
445
BUG_ON(cmd == NULL);
446
446
447
447
if (ata_id_flush_ext_enabled(drive->id) &&
448
448
(drive->capacity64 >= (1UL << 28)))
449
449
cmd->tf.command = ATA_CMD_FLUSH_EXT;
450
450
else
451
451
cmd->tf.command = ATA_CMD_FLUSH;
452
452
cmd->valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
453
453
cmd->tf_flags = IDE_TFLAG_DYN;
454
454
cmd->protocol = ATA_PROT_NODATA;
455
455
rq->cmd_flags &= ~REQ_OP_MASK;
456
456
rq->cmd_flags |= REQ_OP_DRV_OUT;
457
457
ide_req(rq)->type = ATA_PRIV_TASKFILE;
458
-
rq->special = cmd;
458
+
ide_req(rq)->special = cmd;
459
459
cmd->rq = rq;
460
460
461
461
return true;
462
462
}
463
463
464
464
ide_devset_get(multcount, mult_count);
465
465
466
466
/*
467
467
* This is tightly woven into the driver->do_special can not touch.
468
468
* DON'T do it again until a total personality rewrite is committed.