| .. | .. |
|---|
| 427 | 427 | drive->dev_flags |= IDE_DFLAG_NOHPA; /* disable HPA on resume */ |
|---|
| 428 | 428 | } |
|---|
| 429 | 429 | |
|---|
| 430 | | -static int idedisk_prep_fn(struct request_queue *q, struct request *rq) |
|---|
| 430 | +static bool idedisk_prep_rq(ide_drive_t *drive, struct request *rq) |
|---|
| 431 | 431 | { |
|---|
| 432 | | - ide_drive_t *drive = q->queuedata; |
|---|
| 433 | 432 | struct ide_cmd *cmd; |
|---|
| 434 | 433 | |
|---|
| 435 | 434 | if (req_op(rq) != REQ_OP_FLUSH) |
|---|
| 436 | | - return BLKPREP_OK; |
|---|
| 435 | + return true; |
|---|
| 437 | 436 | |
|---|
| 438 | | - if (rq->special) { |
|---|
| 439 | | - cmd = rq->special; |
|---|
| 437 | + if (ide_req(rq)->special) { |
|---|
| 438 | + cmd = ide_req(rq)->special; |
|---|
| 440 | 439 | memset(cmd, 0, sizeof(*cmd)); |
|---|
| 441 | 440 | } else { |
|---|
| 442 | 441 | cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC); |
|---|
| .. | .. |
|---|
| 456 | 455 | rq->cmd_flags &= ~REQ_OP_MASK; |
|---|
| 457 | 456 | rq->cmd_flags |= REQ_OP_DRV_OUT; |
|---|
| 458 | 457 | ide_req(rq)->type = ATA_PRIV_TASKFILE; |
|---|
| 459 | | - rq->special = cmd; |
|---|
| 458 | + ide_req(rq)->special = cmd; |
|---|
| 460 | 459 | cmd->rq = rq; |
|---|
| 461 | 460 | |
|---|
| 462 | | - return BLKPREP_OK; |
|---|
| 461 | + return true; |
|---|
| 463 | 462 | } |
|---|
| 464 | 463 | |
|---|
| 465 | 464 | ide_devset_get(multcount, mult_count); |
|---|
| .. | .. |
|---|
| 548 | 547 | |
|---|
| 549 | 548 | if (barrier) { |
|---|
| 550 | 549 | wc = true; |
|---|
| 551 | | - blk_queue_prep_rq(drive->queue, idedisk_prep_fn); |
|---|
| 550 | + drive->prep_rq = idedisk_prep_rq; |
|---|
| 552 | 551 | } |
|---|
| 553 | 552 | } |
|---|
| 554 | 553 | |
|---|
| .. | .. |
|---|
| 740 | 739 | set_wcache(drive, 1); |
|---|
| 741 | 740 | |
|---|
| 742 | 741 | if ((drive->dev_flags & IDE_DFLAG_LBA) == 0 && |
|---|
| 743 | | - (drive->head == 0 || drive->head > 16)) { |
|---|
| 742 | + (drive->head == 0 || drive->head > 16)) |
|---|
| 744 | 743 | printk(KERN_ERR "%s: invalid geometry: %d physical heads?\n", |
|---|
| 745 | 744 | drive->name, drive->head); |
|---|
| 746 | | - drive->dev_flags &= ~IDE_DFLAG_ATTACH; |
|---|
| 747 | | - } else |
|---|
| 748 | | - drive->dev_flags |= IDE_DFLAG_ATTACH; |
|---|
| 749 | 745 | } |
|---|
| 750 | 746 | |
|---|
| 751 | 747 | static void ide_disk_flush(ide_drive_t *drive) |
|---|
| .. | .. |
|---|
| 795 | 791 | .set_doorlock = ide_disk_set_doorlock, |
|---|
| 796 | 792 | .do_request = ide_do_rw_disk, |
|---|
| 797 | 793 | .ioctl = ide_disk_ioctl, |
|---|
| 794 | + .compat_ioctl = ide_disk_ioctl, |
|---|
| 798 | 795 | }; |
|---|