mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
scsi: qla2xxx: Remove unused qlt_tmr_work()
qlt_tmr_work() is no longer used since commit fb35265b12
("scsi:
qla2xxx: Remove session creation redundant code").
Link: https://lore.kernel.org/r/a0e53c70-b801-adf5-0549-b2b1e421a819@I-love.SAKURA.ne.jp
Tested-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
e6852b41b5
commit
1b2b8d45cc
@ -6334,69 +6334,6 @@ static void qlt_abort_work(struct qla_tgt *tgt,
|
|||||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qlt_tmr_work(struct qla_tgt *tgt,
|
|
||||||
struct qla_tgt_sess_work_param *prm)
|
|
||||||
{
|
|
||||||
struct atio_from_isp *a = &prm->tm_iocb2;
|
|
||||||
struct scsi_qla_host *vha = tgt->vha;
|
|
||||||
struct qla_hw_data *ha = vha->hw;
|
|
||||||
struct fc_port *sess;
|
|
||||||
unsigned long flags;
|
|
||||||
be_id_t s_id;
|
|
||||||
int rc;
|
|
||||||
u64 unpacked_lun;
|
|
||||||
int fn;
|
|
||||||
void *iocb;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
||||||
|
|
||||||
if (tgt->tgt_stop)
|
|
||||||
goto out_term2;
|
|
||||||
|
|
||||||
s_id = prm->tm_iocb2.u.isp24.fcp_hdr.s_id;
|
|
||||||
sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id);
|
|
||||||
if (!sess) {
|
|
||||||
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
||||||
|
|
||||||
sess = qlt_make_local_sess(vha, s_id);
|
|
||||||
/* sess has got an extra creation ref */
|
|
||||||
|
|
||||||
spin_lock_irqsave(&ha->tgt.sess_lock, flags);
|
|
||||||
if (!sess)
|
|
||||||
goto out_term2;
|
|
||||||
} else {
|
|
||||||
if (sess->deleted) {
|
|
||||||
goto out_term2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!kref_get_unless_zero(&sess->sess_kref)) {
|
|
||||||
ql_dbg(ql_dbg_tgt_tmr, vha, 0xf020,
|
|
||||||
"%s: kref_get fail %8phC\n",
|
|
||||||
__func__, sess->port_name);
|
|
||||||
goto out_term2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
iocb = a;
|
|
||||||
fn = a->u.isp24.fcp_cmnd.task_mgmt_flags;
|
|
||||||
unpacked_lun =
|
|
||||||
scsilun_to_int((struct scsi_lun *)&a->u.isp24.fcp_cmnd.lun);
|
|
||||||
|
|
||||||
rc = qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0);
|
|
||||||
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
||||||
|
|
||||||
ha->tgt.tgt_ops->put_sess(sess);
|
|
||||||
|
|
||||||
if (rc != 0)
|
|
||||||
goto out_term;
|
|
||||||
return;
|
|
||||||
|
|
||||||
out_term2:
|
|
||||||
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
|
|
||||||
out_term:
|
|
||||||
qlt_send_term_exchange(ha->base_qpair, NULL, &prm->tm_iocb2, 1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void qlt_sess_work_fn(struct work_struct *work)
|
static void qlt_sess_work_fn(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct qla_tgt *tgt = container_of(work, struct qla_tgt, sess_work);
|
struct qla_tgt *tgt = container_of(work, struct qla_tgt, sess_work);
|
||||||
@ -6423,9 +6360,6 @@ static void qlt_sess_work_fn(struct work_struct *work)
|
|||||||
case QLA_TGT_SESS_WORK_ABORT:
|
case QLA_TGT_SESS_WORK_ABORT:
|
||||||
qlt_abort_work(tgt, prm);
|
qlt_abort_work(tgt, prm);
|
||||||
break;
|
break;
|
||||||
case QLA_TGT_SESS_WORK_TM:
|
|
||||||
qlt_tmr_work(tgt, prm);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
BUG_ON(1);
|
BUG_ON(1);
|
||||||
break;
|
break;
|
||||||
|
@ -942,7 +942,6 @@ struct qla_tgt_sess_work_param {
|
|||||||
struct list_head sess_works_list_entry;
|
struct list_head sess_works_list_entry;
|
||||||
|
|
||||||
#define QLA_TGT_SESS_WORK_ABORT 1
|
#define QLA_TGT_SESS_WORK_ABORT 1
|
||||||
#define QLA_TGT_SESS_WORK_TM 2
|
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
Loading…
Reference in New Issue
Block a user