Commit 5c113eb3 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: hptiop: Stop using the SCSI pointer

Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.

Rename hpt_scsi_pointer into hpt_cmd_priv because that data structure is
not related to struct scsi_pointer.

Link: https://lore.kernel.org/r/20220218195117.25689-24-bvanassche@acm.orgReviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 924cb24d
...@@ -1174,6 +1174,7 @@ static struct scsi_host_template driver_template = { ...@@ -1174,6 +1174,7 @@ static struct scsi_host_template driver_template = {
.slave_configure = hptiop_slave_config, .slave_configure = hptiop_slave_config,
.this_id = -1, .this_id = -1,
.change_queue_depth = hptiop_adjust_disk_queue_depth, .change_queue_depth = hptiop_adjust_disk_queue_depth,
.cmd_size = sizeof(struct hpt_cmd_priv),
}; };
static int hptiop_internal_memalloc_itl(struct hptiop_hba *hba) static int hptiop_internal_memalloc_itl(struct hptiop_hba *hba)
......
...@@ -251,13 +251,13 @@ struct hptiop_request { ...@@ -251,13 +251,13 @@ struct hptiop_request {
int index; int index;
}; };
struct hpt_scsi_pointer { struct hpt_cmd_priv {
int mapped; int mapped;
int sgcnt; int sgcnt;
dma_addr_t dma_handle; dma_addr_t dma_handle;
}; };
#define HPT_SCP(scp) ((struct hpt_scsi_pointer *)&(scp)->SCp) #define HPT_SCP(scp) ((struct hpt_cmd_priv *)scsi_cmd_priv(scp))
enum hptiop_family { enum hptiop_family {
UNKNOWN_BASED_IOP, UNKNOWN_BASED_IOP,
......
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