Blob Blame History Raw
From: Bart Van Assche <bvanassche@acm.org>
Date: Mon, 9 Aug 2021 16:03:41 -0700
Subject: scsi: qla2xxx: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
Patch-mainline: v5.15-rc1
Git-commit: c7d6b2c2cd5656b05849afb0de3f422da1742d0f
References: bsc#1190941

Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Link: https://lore.kernel.org/r/20210809230355.8186-39-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/qla2xxx/qla_os.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -858,7 +858,7 @@ qla2xxx_queuecommand(struct Scsi_Host *h
 		struct qla_qpair *qpair = NULL;
 
 		if (shost_use_blk_mq(vha->host)) {
-			tag = blk_mq_unique_tag(cmd->request);
+			tag = blk_mq_unique_tag(scsi_cmd_to_rq(cmd));
 			hwq = blk_mq_unique_tag_to_hwq(tag);
 			qpair = ha->queue_pair_map[hwq];
 		} else if (vha->vp_idx && vha->qpair) {
@@ -1770,7 +1770,7 @@ static void qla2x00_abort_srb(struct qla
 		}
 
 		spin_lock_irqsave(qp->qp_lock_ptr, *flags);
-		if (ret_cmd && blk_mq_request_started(cmd->request))
+		if (ret_cmd && blk_mq_request_started(scsi_cmd_to_rq(cmd)))
 			sp->done(sp, res);
 	} else {
 		sp->done(sp, res);