hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/ide/ide-park.c
....@@ -27,7 +27,7 @@
2727 spin_unlock_irq(&hwif->lock);
2828
2929 if (start_queue)
30
- blk_run_queue(q);
30
+ blk_mq_run_hw_queues(q, true);
3131 return;
3232 }
3333 spin_unlock_irq(&hwif->lock);
....@@ -36,7 +36,7 @@
3636 scsi_req(rq)->cmd[0] = REQ_PARK_HEADS;
3737 scsi_req(rq)->cmd_len = 1;
3838 ide_req(rq)->type = ATA_PRIV_MISC;
39
- rq->special = &timeout;
39
+ ide_req(rq)->special = &timeout;
4040 blk_execute_rq(q, NULL, rq, 1);
4141 rc = scsi_req(rq)->result ? -EIO : 0;
4242 blk_put_request(rq);
....@@ -54,7 +54,9 @@
5454 scsi_req(rq)->cmd[0] = REQ_UNPARK_HEADS;
5555 scsi_req(rq)->cmd_len = 1;
5656 ide_req(rq)->type = ATA_PRIV_MISC;
57
- elv_add_request(q, rq, ELEVATOR_INSERT_FRONT);
57
+ spin_lock_irq(&hwif->lock);
58
+ ide_insert_request_head(drive, rq);
59
+ spin_unlock_irq(&hwif->lock);
5860
5961 out:
6062 return;
....@@ -67,7 +69,7 @@
6769
6870 memset(&cmd, 0, sizeof(cmd));
6971 if (scsi_req(rq)->cmd[0] == REQ_PARK_HEADS) {
70
- drive->sleep = *(unsigned long *)rq->special;
72
+ drive->sleep = *(unsigned long *)ide_req(rq)->special;
7173 drive->dev_flags |= IDE_DFLAG_SLEEPING;
7274 tf->command = ATA_CMD_IDLEIMMEDIATE;
7375 tf->feature = 0x44;