aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-11-10 03:30:49 -0500
committerJens Axboe <axboe@kernel.dk>2018-11-10 10:03:52 -0500
commit22ce0a7ccf23d55d1fdaa2974002f8b5ae765665 (patch)
treeeeec96b0413cbbfd95305acc783d7d6574f3ce42 /drivers/ide/ide-io.c
parent289d088b66182076d33b5579417d429371cf9dfd (diff)
ide: don't use req->special
Just replace it with a field of the same name in struct ide_req. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 64e72640acf8..94e9c79c41cf 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -111,7 +111,7 @@ void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
111 } 111 }
112 112
113 if (rq && ata_taskfile_request(rq)) { 113 if (rq && ata_taskfile_request(rq)) {
114 struct ide_cmd *orig_cmd = rq->special; 114 struct ide_cmd *orig_cmd = ide_req(rq)->special;
115 115
116 if (cmd->tf_flags & IDE_TFLAG_DYN) 116 if (cmd->tf_flags & IDE_TFLAG_DYN)
117 kfree(orig_cmd); 117 kfree(orig_cmd);
@@ -261,7 +261,7 @@ EXPORT_SYMBOL_GPL(ide_init_sg_cmd);
261static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, 261static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
262 struct request *rq) 262 struct request *rq)
263{ 263{
264 struct ide_cmd *cmd = rq->special; 264 struct ide_cmd *cmd = ide_req(rq)->special;
265 265
266 if (cmd) { 266 if (cmd) {
267 if (cmd->protocol == ATA_PROT_PIO) { 267 if (cmd->protocol == ATA_PROT_PIO) {
@@ -352,7 +352,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
352 if (ata_taskfile_request(rq)) 352 if (ata_taskfile_request(rq))
353 return execute_drive_cmd(drive, rq); 353 return execute_drive_cmd(drive, rq);
354 else if (ata_pm_request(rq)) { 354 else if (ata_pm_request(rq)) {
355 struct ide_pm_state *pm = rq->special; 355 struct ide_pm_state *pm = ide_req(rq)->special;
356#ifdef DEBUG_PM 356#ifdef DEBUG_PM
357 printk("%s: start_power_step(step: %d)\n", 357 printk("%s: start_power_step(step: %d)\n",
358 drive->name, pm->pm_step); 358 drive->name, pm->pm_step);
@@ -460,16 +460,20 @@ blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *hctx,
460 ide_drive_t *drive = hctx->queue->queuedata; 460 ide_drive_t *drive = hctx->queue->queuedata;
461 ide_hwif_t *hwif = drive->hwif; 461 ide_hwif_t *hwif = drive->hwif;
462 struct ide_host *host = hwif->host; 462 struct ide_host *host = hwif->host;
463 struct request *rq = NULL; 463 struct request *rq = bd->rq;
464 ide_startstop_t startstop; 464 ide_startstop_t startstop;
465 465
466 if (!(rq->rq_flags & RQF_DONTPREP)) {
467 rq->rq_flags |= RQF_DONTPREP;
468 ide_req(rq)->special = NULL;
469 }
470
466 /* HLD do_request() callback might sleep, make sure it's okay */ 471 /* HLD do_request() callback might sleep, make sure it's okay */
467 might_sleep(); 472 might_sleep();
468 473
469 if (ide_lock_host(host, hwif)) 474 if (ide_lock_host(host, hwif))
470 return BLK_STS_DEV_RESOURCE; 475 return BLK_STS_DEV_RESOURCE;
471 476
472 rq = bd->rq;
473 blk_mq_start_request(rq); 477 blk_mq_start_request(rq);
474 478
475 spin_lock_irq(&hwif->lock); 479 spin_lock_irq(&hwif->lock);