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

index c57cec6..28eab07 100644 (file)
@@ -288,7 +288,7 @@ int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb)
        /* Acquire hardware specific lock */
        spin_lock_irqsave(&ha->hardware_lock, flags);
 
-       index = (uint32_t)cmd->request->tag;
+       index = scsi_cmd_to_rq(cmd)->tag;
 
        /*
         * Check to see if adapter is online before placing request on
index 3f77373..f1ea65c 100644 (file)
@@ -9282,7 +9282,7 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd)
        DEBUG2(printk(KERN_INFO
                      "scsi%ld: DEVICE_RESET cmd=%p jiffies = 0x%lx, to=%x,"
                      "dpc_flags=%lx, status=%x allowed=%d\n", ha->host_no,
-                     cmd, jiffies, cmd->request->timeout / HZ,
+                     cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ,
                      ha->dpc_flags, cmd->result, cmd->allowed));
 
        rval = qla4xxx_isp_check_reg(ha);
@@ -9349,7 +9349,7 @@ static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd)
        DEBUG2(printk(KERN_INFO
                      "scsi%ld: TARGET_DEVICE_RESET cmd=%p jiffies = 0x%lx, "
                      "to=%x,dpc_flags=%lx, status=%x allowed=%d\n",
-                     ha->host_no, cmd, jiffies, cmd->request->timeout / HZ,
+                     ha->host_no, cmd, jiffies, scsi_cmd_to_rq(cmd)->timeout / HZ,
                      ha->dpc_flags, cmd->result, cmd->allowed));
 
        rval = qla4xxx_isp_check_reg(ha);