scsi: qla2xxx: Remove unused qlt_free_qfull_cmds()

qlt_free_qfull_cmds() was added in 2014 as part of commit 33e7997755
("qla2xxx: Add support for QFull throttling and Term Exchange retry") but
has remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250415002803.135909-2-linux@treblig.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Dr. David Alan Gilbert 2025-04-15 01:27:56 +01:00 committed by Martin K. Petersen
parent 0af2f6be1b
commit ae7a08bee8
2 changed files with 0 additions and 76 deletions

View file

@ -5539,81 +5539,6 @@ qlt_alloc_qfull_cmd(struct scsi_qla_host *vha,
spin_unlock_irqrestore(&vha->hw->tgt.q_full_lock, flags);
}
int
qlt_free_qfull_cmds(struct qla_qpair *qpair)
{
struct scsi_qla_host *vha = qpair->vha;
struct qla_hw_data *ha = vha->hw;
unsigned long flags;
struct qla_tgt_cmd *cmd, *tcmd;
struct list_head free_list, q_full_list;
int rc = 0;
if (list_empty(&ha->tgt.q_full_list))
return 0;
INIT_LIST_HEAD(&free_list);
INIT_LIST_HEAD(&q_full_list);
spin_lock_irqsave(&vha->hw->tgt.q_full_lock, flags);
if (list_empty(&ha->tgt.q_full_list)) {
spin_unlock_irqrestore(&vha->hw->tgt.q_full_lock, flags);
return 0;
}
list_splice_init(&vha->hw->tgt.q_full_list, &q_full_list);
spin_unlock_irqrestore(&vha->hw->tgt.q_full_lock, flags);
spin_lock_irqsave(qpair->qp_lock_ptr, flags);
list_for_each_entry_safe(cmd, tcmd, &q_full_list, cmd_list) {
if (cmd->q_full)
/* cmd->state is a borrowed field to hold status */
rc = __qlt_send_busy(qpair, &cmd->atio, cmd->state);
else if (cmd->term_exchg)
rc = __qlt_send_term_exchange(qpair, NULL, &cmd->atio);
if (rc == -ENOMEM)
break;
if (cmd->q_full)
ql_dbg(ql_dbg_io, vha, 0x3006,
"%s: busy sent for ox_id[%04x]\n", __func__,
be16_to_cpu(cmd->atio.u.isp24.fcp_hdr.ox_id));
else if (cmd->term_exchg)
ql_dbg(ql_dbg_io, vha, 0x3007,
"%s: Term exchg sent for ox_id[%04x]\n", __func__,
be16_to_cpu(cmd->atio.u.isp24.fcp_hdr.ox_id));
else
ql_dbg(ql_dbg_io, vha, 0x3008,
"%s: Unexpected cmd in QFull list %p\n", __func__,
cmd);
list_move_tail(&cmd->cmd_list, &free_list);
/* piggy back on hardware_lock for protection */
vha->hw->tgt.num_qfull_cmds_alloc--;
}
spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
cmd = NULL;
list_for_each_entry_safe(cmd, tcmd, &free_list, cmd_list) {
list_del(&cmd->cmd_list);
/* This cmd was never sent to TCM. There is no need
* to schedule free or call free_cmd
*/
qlt_free_cmd(cmd);
}
if (!list_empty(&q_full_list)) {
spin_lock_irqsave(&vha->hw->tgt.q_full_lock, flags);
list_splice(&q_full_list, &vha->hw->tgt.q_full_list);
spin_unlock_irqrestore(&vha->hw->tgt.q_full_lock, flags);
}
return rc;
}
static void
qlt_send_busy(struct qla_qpair *qpair, struct atio_from_isp *atio,
uint16_t status)

View file

@ -1083,7 +1083,6 @@ extern int qlt_stop_phase1(struct qla_tgt *);
extern void qlt_stop_phase2(struct qla_tgt *);
extern irqreturn_t qla83xx_msix_atio_q(int, void *);
extern void qlt_83xx_iospace_config(struct qla_hw_data *);
extern int qlt_free_qfull_cmds(struct qla_qpair *);
extern void qlt_logo_completion_handler(fc_port_t *, int);
extern void qlt_do_generation_tick(struct scsi_qla_host *, int *);