scsi: aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
authorBart Van Assche <bvanassche@acm.org>
Mon, 9 Aug 2021 23:03:16 +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-14-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/commsup.c

index 267934d..c2d6f0a 100644 (file)
@@ -1504,7 +1504,7 @@ static struct aac_srb * aac_scsi_common(struct fib * fib, struct scsi_cmnd * cmd
        srbcmd->id       = cpu_to_le32(scmd_id(cmd));
        srbcmd->lun      = cpu_to_le32(cmd->device->lun);
        srbcmd->flags    = cpu_to_le32(flag);
-       timeout = cmd->request->timeout/HZ;
+       timeout = scsi_cmd_to_rq(cmd)->timeout / HZ;
        if (timeout == 0)
                timeout = (dev->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT);
        srbcmd->timeout  = cpu_to_le32(timeout);  // timeout in seconds
index 54eb4d4..deb32c9 100644 (file)
@@ -224,7 +224,7 @@ struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd)
 {
        struct fib *fibptr;
 
-       fibptr = &dev->fibs[scmd->request->tag];
+       fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag];
        /*
         *      Null out fields that depend on being zero at the start of
         *      each I/O