Skip to content

Commit 9da4e1d

Browse files
abattersbymartinkpetersen
authored andcommitted
scsi: qla2xxx: target: Remove code for unsupported hardware
As far as I can tell, CONTINUE_TGT_IO_TYPE and CTIO_A64_TYPE are message types from non-FWI2 boards (older than ISP24xx), which are not supported by qla_target.c. Removing them makes it possible to turn a void * into the real type and avoid some typecasts. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Link: https://patch.msgid.link/cb006628-e321-4e30-a60b-08b37b8685a5@cybernetics.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 957aa59 commit 9da4e1d

1 file changed

Lines changed: 5 additions & 27 deletions

File tree

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3913,7 +3913,8 @@ static void *qlt_ctio_to_cmd(struct scsi_qla_host *vha,
39133913
* ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
39143914
*/
39153915
static void qlt_do_ctio_completion(struct scsi_qla_host *vha,
3916-
struct rsp_que *rsp, uint32_t handle, uint32_t status, void *ctio)
3916+
struct rsp_que *rsp, uint32_t handle, uint32_t status,
3917+
struct ctio7_from_24xx *ctio)
39173918
{
39183919
struct qla_hw_data *ha = vha->hw;
39193920
struct se_cmd *se_cmd;
@@ -3934,11 +3935,8 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha,
39343935
if (cmd == NULL)
39353936
return;
39363937

3937-
if ((le16_to_cpu(((struct ctio7_from_24xx *)ctio)->flags) & CTIO7_FLAGS_DATA_OUT) &&
3938-
cmd->sess) {
3939-
qlt_chk_edif_rx_sa_delete_pending(vha, cmd->sess,
3940-
(struct ctio7_from_24xx *)ctio);
3941-
}
3938+
if ((le16_to_cpu(ctio->flags) & CTIO7_FLAGS_DATA_OUT) && cmd->sess)
3939+
qlt_chk_edif_rx_sa_delete_pending(vha, cmd->sess, ctio);
39423940

39433941
se_cmd = &cmd->se_cmd;
39443942
cmd->cmd_sent_to_fw = 0;
@@ -4007,7 +4005,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha,
40074005
*((u64 *)&crc->actual_dif[0]),
40084006
*((u64 *)&crc->expected_dif[0]));
40094007

4010-
qlt_handle_dif_error(qpair, cmd, ctio);
4008+
qlt_handle_dif_error(qpair, cmd, crc);
40114009
return;
40124010
}
40134011

@@ -5816,26 +5814,6 @@ static void qlt_response_pkt(struct scsi_qla_host *vha,
58165814
}
58175815
break;
58185816

5819-
case CONTINUE_TGT_IO_TYPE:
5820-
{
5821-
struct ctio_to_2xxx *entry = (struct ctio_to_2xxx *)pkt;
5822-
5823-
qlt_do_ctio_completion(vha, rsp, entry->handle,
5824-
le16_to_cpu(entry->status)|(pkt->entry_status << 16),
5825-
entry);
5826-
break;
5827-
}
5828-
5829-
case CTIO_A64_TYPE:
5830-
{
5831-
struct ctio_to_2xxx *entry = (struct ctio_to_2xxx *)pkt;
5832-
5833-
qlt_do_ctio_completion(vha, rsp, entry->handle,
5834-
le16_to_cpu(entry->status)|(pkt->entry_status << 16),
5835-
entry);
5836-
break;
5837-
}
5838-
58395817
case IMMED_NOTIFY_TYPE:
58405818
ql_dbg(ql_dbg_tgt, vha, 0xe035, "%s", "IMMED_NOTIFY\n");
58415819
qlt_handle_imm_notify(vha, (struct imm_ntfy_from_isp *)pkt);

0 commit comments

Comments
 (0)