Commit 24b3c922 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: mpt3sas: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

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-31-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 69868c3b
...@@ -3848,7 +3848,7 @@ _base_get_msix_index(struct MPT3SAS_ADAPTER *ioc, ...@@ -3848,7 +3848,7 @@ _base_get_msix_index(struct MPT3SAS_ADAPTER *ioc,
&ioc->total_io_cnt), ioc->reply_queue_count) : 0; &ioc->total_io_cnt), ioc->reply_queue_count) : 0;
if (scmd && ioc->shost->nr_hw_queues > 1) { if (scmd && ioc->shost->nr_hw_queues > 1) {
u32 tag = blk_mq_unique_tag(scmd->request); u32 tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd));
return blk_mq_unique_tag_to_hwq(tag) + return blk_mq_unique_tag_to_hwq(tag) +
ioc->high_iops_queues; ioc->high_iops_queues;
...@@ -3932,7 +3932,7 @@ mpt3sas_base_get_smid_scsiio(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx, ...@@ -3932,7 +3932,7 @@ mpt3sas_base_get_smid_scsiio(struct MPT3SAS_ADAPTER *ioc, u8 cb_idx,
u16 smid; u16 smid;
u32 tag, unique_tag; u32 tag, unique_tag;
unique_tag = blk_mq_unique_tag(scmd->request); unique_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd));
tag = blk_mq_unique_tag_to_tag(unique_tag); tag = blk_mq_unique_tag_to_tag(unique_tag);
/* /*
......
...@@ -3305,7 +3305,7 @@ scsih_abort(struct scsi_cmnd *scmd) ...@@ -3305,7 +3305,7 @@ scsih_abort(struct scsi_cmnd *scmd)
sdev_printk(KERN_INFO, scmd->device, "attempting task abort!" sdev_printk(KERN_INFO, scmd->device, "attempting task abort!"
"scmd(0x%p), outstanding for %u ms & timeout %u ms\n", "scmd(0x%p), outstanding for %u ms & timeout %u ms\n",
scmd, jiffies_to_msecs(jiffies - scmd->jiffies_at_alloc), scmd, jiffies_to_msecs(jiffies - scmd->jiffies_at_alloc),
(scmd->request->timeout / HZ) * 1000); (scsi_cmd_to_rq(scmd)->timeout / HZ) * 1000);
_scsih_tm_display_info(ioc, scmd); _scsih_tm_display_info(ioc, scmd);
sas_device_priv_data = scmd->device->hostdata; sas_device_priv_data = scmd->device->hostdata;
...@@ -5075,7 +5075,7 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, ...@@ -5075,7 +5075,7 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG |
MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD; MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD;
mpi_request->CDB.EEDP32.PrimaryReferenceTag = mpi_request->CDB.EEDP32.PrimaryReferenceTag =
cpu_to_be32(t10_pi_ref_tag(scmd->request)); cpu_to_be32(t10_pi_ref_tag(scsi_cmd_to_rq(scmd)));
break; break;
case SCSI_PROT_DIF_TYPE3: case SCSI_PROT_DIF_TYPE3:
...@@ -5142,7 +5142,7 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd) ...@@ -5142,7 +5142,7 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
struct MPT3SAS_DEVICE *sas_device_priv_data; struct MPT3SAS_DEVICE *sas_device_priv_data;
struct MPT3SAS_TARGET *sas_target_priv_data; struct MPT3SAS_TARGET *sas_target_priv_data;
struct _raid_device *raid_device; struct _raid_device *raid_device;
struct request *rq = scmd->request; struct request *rq = scsi_cmd_to_rq(scmd);
int class; int class;
Mpi25SCSIIORequest_t *mpi_request; Mpi25SCSIIORequest_t *mpi_request;
struct _pcie_device *pcie_device = NULL; struct _pcie_device *pcie_device = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment