scsi: dpt_i2o: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
authorBart Van Assche <bvanassche@acm.org>
Mon, 9 Aug 2021 23:03:22 +0000 (16:03 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Aug 2021 02:25:38 +0000 (22:25 -0400)
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-20-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/dpt_i2o.c

index a18a4a0..7af96d1 100644 (file)
@@ -652,7 +652,7 @@ static int adpt_abort(struct scsi_cmnd * cmd)
        msg[2] = 0;
        msg[3]= 0;
        /* Add 1 to avoid firmware treating it as invalid command */
-       msg[4] = cmd->request->tag + 1;
+       msg[4] = scsi_cmd_to_rq(cmd)->tag + 1;
        if (pHba->host)
                spin_lock_irq(pHba->host->host_lock);
        rcode = adpt_i2o_post_wait(pHba, msg, sizeof(msg), FOREVER);
@@ -2236,7 +2236,7 @@ static s32 adpt_scsi_to_i2o(adpt_hba* pHba, struct scsi_cmnd* cmd, struct adpt_d
        msg[1] = ((0xff<<24)|(HOST_TID<<12)|d->tid);
        msg[2] = 0;
        /* Add 1 to avoid firmware treating it as invalid command */
-       msg[3] = cmd->request->tag + 1;
+       msg[3] = scsi_cmd_to_rq(cmd)->tag + 1;
        // Our cards use the transaction context as the tag for queueing
        // Adaptec/DPT Private stuff 
        msg[4] = I2O_CMD_SCSI_EXEC|(DPT_ORGANIZATION_ID<<16);