diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-02-18 11:50:57 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-22 21:11:05 -0500 |
commit | a33e7925b5e61f9de1c5cc59d1a92569665fdfe5 (patch) | |
tree | 127356ee7b996a5bb775b113bf018a8d3a204759 /drivers/scsi/qedf/qedf_main.c | |
parent | f4b4216f3e52b4e3dfc104fdb172590f686805f6 (diff) | |
download | linux-a33e7925b5e61f9de1c5cc59d1a92569665fdfe5.tar.bz2 |
scsi: qedf: Stop using the SCSI pointer
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. Remove the CMD_SCSI_STATUS() assignment because the
assigned value is not used.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-30-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>
Diffstat (limited to 'drivers/scsi/qedf/qedf_main.c')
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 6ad28bc8e948..18dc68d577b6 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -740,7 +740,7 @@ static int qedf_eh_abort(struct scsi_cmnd *sc_cmd) } - io_req = (struct qedf_ioreq *)sc_cmd->SCp.ptr; + io_req = qedf_priv(sc_cmd)->io_req; if (!io_req) { QEDF_ERR(&qedf->dbg_ctx, "sc_cmd not queued with lld, sc_cmd=%p op=0x%02x, port_id=%06x\n", @@ -996,6 +996,7 @@ static struct scsi_host_template qedf_host_template = { .sg_tablesize = QEDF_MAX_BDS_PER_CMD, .can_queue = FCOE_PARAMS_NUM_TASKS, .change_queue_depth = scsi_change_queue_depth, + .cmd_size = sizeof(struct qedf_cmd_priv), }; static int qedf_get_paged_crc_eof(struct sk_buff *skb, int tlen) |