@@ -1174,6 +1174,7 @@ static struct scsi_host_template driver_template = {
.slave_configure = hptiop_slave_config,
.this_id = -1,
.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)
@@ -251,13 +251,13 @@ struct hptiop_request {
int index;
};
-struct hpt_scsi_pointer {
+struct hpt_cmd_priv {
int mapped;
int sgcnt;
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 {
UNKNOWN_BASED_IOP,
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. Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/scsi/hptiop.c | 1 + drivers/scsi/hptiop.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)