Lines Matching refs:sess

123 static int qlt_issue_task_mgmt(struct fc_port *sess, u64 lun,
139 void qlt_unreg_sess(struct fc_port *sess);
732 struct fc_port *sess = fcport; in qlt_fc_port_added() local
749 if (!sess->se_sess) { in qlt_fc_port_added()
753 sess = qlt_create_sess(vha, fcport, false); in qlt_fc_port_added()
763 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_fc_port_added()
766 __func__, sess->port_name); in qlt_fc_port_added()
774 sess->local ? "local " : "", sess->port_name, sess->loop_id); in qlt_fc_port_added()
777 "Reappeared sess %p\n", sess); in qlt_fc_port_added()
779 ha->tgt.tgt_ops->update_sess(sess, fcport->d_id, in qlt_fc_port_added()
784 if (sess && sess->local) { in qlt_fc_port_added()
788 fcport->port_name, sess->loop_id); in qlt_fc_port_added()
789 sess->local = 0; in qlt_fc_port_added()
791 ha->tgt.tgt_ops->put_sess(sess); in qlt_fc_port_added()
882 struct fc_port *sess, enum qlt_plogi_link_t link) in qlt_plogi_ack_link() argument
891 sess, link, sess->port_name, in qlt_plogi_ack_link()
897 switch (sess->disc_state) { in qlt_plogi_ack_link()
907 if (sess->plogi_link[link]) in qlt_plogi_ack_link()
908 qlt_plogi_ack_unref(vha, sess->plogi_link[link]); in qlt_plogi_ack_link()
911 pla->fcport = sess; in qlt_plogi_ack_link()
913 sess->plogi_link[link] = pla; in qlt_plogi_ack_link()
964 struct fc_port *sess = container_of(work, struct fc_port, in qlt_free_session_done() local
966 struct qla_tgt *tgt = sess->tgt; in qlt_free_session_done()
967 struct scsi_qla_host *vha = sess->vha; in qlt_free_session_done()
973 sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN]; in qlt_free_session_done()
978 __func__, sess->se_sess, sess, sess->port_name, sess->loop_id, in qlt_free_session_done()
979 sess->d_id.b.domain, sess->d_id.b.area, sess->d_id.b.al_pa, in qlt_free_session_done()
980 sess->logout_on_delete, sess->keep_nport_handle, in qlt_free_session_done()
981 sess->send_els_logo); in qlt_free_session_done()
983 if (!IS_SW_RESV_ADDR(sess->d_id)) { in qlt_free_session_done()
984 if (sess->send_els_logo) { in qlt_free_session_done()
987 logo.id = sess->d_id; in qlt_free_session_done()
991 sess->send_els_logo = 0; in qlt_free_session_done()
994 if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) { in qlt_free_session_done()
1000 rc = qla2x00_post_async_logout_work(vha, sess, in qlt_free_session_done()
1005 sess, rc); in qlt_free_session_done()
1010 rc = qla2x00_post_async_prlo_work(vha, sess, in qlt_free_session_done()
1015 sess, rc); in qlt_free_session_done()
1025 if (sess->se_sess != NULL) in qlt_free_session_done()
1026 ha->tgt.tgt_ops->free_session(sess); in qlt_free_session_done()
1031 while (!READ_ONCE(sess->logout_completed)) { in qlt_free_session_done()
1035 __func__, sess); in qlt_free_session_done()
1042 "%s: sess %p logout completed\n", __func__, sess); in qlt_free_session_done()
1045 if (sess->logo_ack_needed) { in qlt_free_session_done()
1046 sess->logo_ack_needed = 0; in qlt_free_session_done()
1047 qla24xx_async_notify_ack(vha, sess, in qlt_free_session_done()
1048 (struct imm_ntfy_from_isp *)sess->iocb, SRB_NACK_LOGO); in qlt_free_session_done()
1052 if (sess->se_sess) { in qlt_free_session_done()
1053 sess->se_sess = NULL; in qlt_free_session_done()
1054 if (tgt && !IS_SW_RESV_ADDR(sess->d_id)) in qlt_free_session_done()
1058 sess->disc_state = DSC_DELETED; in qlt_free_session_done()
1059 sess->fw_login_state = DSC_LS_PORT_UNAVAIL; in qlt_free_session_done()
1060 sess->deleted = QLA_SESS_DELETED; in qlt_free_session_done()
1062 if (sess->login_succ && !IS_SW_RESV_ADDR(sess->d_id)) { in qlt_free_session_done()
1064 sess->login_succ = 0; in qlt_free_session_done()
1067 qla2x00_clear_loop_id(sess); in qlt_free_session_done()
1069 if (sess->conflict) { in qlt_free_session_done()
1070 sess->conflict->login_pause = 0; in qlt_free_session_done()
1071 sess->conflict = NULL; in qlt_free_session_done()
1078 sess->plogi_link[QLT_PLOGI_LINK_CONFLICT]; in qlt_free_session_done()
1080 own = sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN]; in qlt_free_session_done()
1087 sess->se_sess, sess, sess->port_name, in qlt_free_session_done()
1092 sess->plogi_link[QLT_PLOGI_LINK_CONFLICT] = NULL; in qlt_free_session_done()
1096 sess->se_sess, sess, sess->port_name, in qlt_free_session_done()
1103 sess->fw_login_state = DSC_LS_PLOGI_PEND; in qlt_free_session_done()
1105 sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN] = NULL; in qlt_free_session_done()
1113 sess, sess->port_name, vha->fcport_count); in qlt_free_session_done()
1123 sess->free_pending = 0; in qlt_free_session_done()
1144 void qlt_unreg_sess(struct fc_port *sess) in qlt_unreg_sess() argument
1146 struct scsi_qla_host *vha = sess->vha; in qlt_unreg_sess()
1149 ql_dbg(ql_dbg_disc, sess->vha, 0x210a, in qlt_unreg_sess()
1151 __func__, sess, sess->port_name); in qlt_unreg_sess()
1153 spin_lock_irqsave(&sess->vha->work_lock, flags); in qlt_unreg_sess()
1154 if (sess->free_pending) { in qlt_unreg_sess()
1155 spin_unlock_irqrestore(&sess->vha->work_lock, flags); in qlt_unreg_sess()
1158 sess->free_pending = 1; in qlt_unreg_sess()
1159 spin_unlock_irqrestore(&sess->vha->work_lock, flags); in qlt_unreg_sess()
1161 if (sess->se_sess) in qlt_unreg_sess()
1162 vha->hw->tgt.tgt_ops->clear_nacl_from_fcport_map(sess); in qlt_unreg_sess()
1164 qla2x00_mark_device_lost(vha, sess, 0, 0); in qlt_unreg_sess()
1166 sess->deleted = QLA_SESS_DELETION_IN_PROGRESS; in qlt_unreg_sess()
1167 sess->disc_state = DSC_DELETE_PEND; in qlt_unreg_sess()
1168 sess->last_rscn_gen = sess->rscn_gen; in qlt_unreg_sess()
1169 sess->last_login_gen = sess->login_gen; in qlt_unreg_sess()
1171 if (sess->nvme_flag & NVME_FLAG_REGISTERED && in qlt_unreg_sess()
1172 !(sess->nvme_flag & NVME_FLAG_DELETING)) { in qlt_unreg_sess()
1173 sess->nvme_flag |= NVME_FLAG_DELETING; in qlt_unreg_sess()
1174 schedule_work(&sess->nvme_del_work); in qlt_unreg_sess()
1176 INIT_WORK(&sess->free_work, qlt_free_session_done); in qlt_unreg_sess()
1177 schedule_work(&sess->free_work); in qlt_unreg_sess()
1185 struct fc_port *sess = NULL; in qlt_reset() local
1200 sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id); in qlt_reset()
1205 "Using sess for qla_tgt_reset: %p\n", sess); in qlt_reset()
1206 if (!sess) { in qlt_reset()
1213 "loop_id %d)\n", vha->host_no, sess, sess->port_name, in qlt_reset()
1216 return qlt_issue_task_mgmt(sess, 0, mcmd, iocb, QLA24XX_MGMT_SEND_NACK); in qlt_reset()
1219 static void qla24xx_chk_fcp_state(struct fc_port *sess) in qla24xx_chk_fcp_state() argument
1221 if (sess->chip_reset != sess->vha->hw->base_qpair->chip_reset) { in qla24xx_chk_fcp_state()
1222 sess->logout_on_delete = 0; in qla24xx_chk_fcp_state()
1223 sess->logo_ack_needed = 0; in qla24xx_chk_fcp_state()
1224 sess->fw_login_state = DSC_LS_PORT_UNAVAIL; in qla24xx_chk_fcp_state()
1225 sess->scan_state = 0; in qla24xx_chk_fcp_state()
1229 void qlt_schedule_sess_for_deletion(struct fc_port *sess) in qlt_schedule_sess_for_deletion() argument
1231 struct qla_tgt *tgt = sess->tgt; in qlt_schedule_sess_for_deletion()
1234 if (sess->disc_state == DSC_DELETE_PEND) in qlt_schedule_sess_for_deletion()
1237 if (sess->disc_state == DSC_DELETED) { in qlt_schedule_sess_for_deletion()
1240 if (sess->vha->fcport_count == 0) in qlt_schedule_sess_for_deletion()
1241 wake_up_all(&sess->vha->fcport_waitQ); in qlt_schedule_sess_for_deletion()
1243 if (!sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN] && in qlt_schedule_sess_for_deletion()
1244 !sess->plogi_link[QLT_PLOGI_LINK_CONFLICT]) in qlt_schedule_sess_for_deletion()
1248 if (sess->deleted == QLA_SESS_DELETED) in qlt_schedule_sess_for_deletion()
1249 sess->logout_on_delete = 0; in qlt_schedule_sess_for_deletion()
1251 spin_lock_irqsave(&sess->vha->work_lock, flags); in qlt_schedule_sess_for_deletion()
1252 if (sess->deleted == QLA_SESS_DELETION_IN_PROGRESS) { in qlt_schedule_sess_for_deletion()
1253 spin_unlock_irqrestore(&sess->vha->work_lock, flags); in qlt_schedule_sess_for_deletion()
1256 sess->deleted = QLA_SESS_DELETION_IN_PROGRESS; in qlt_schedule_sess_for_deletion()
1257 spin_unlock_irqrestore(&sess->vha->work_lock, flags); in qlt_schedule_sess_for_deletion()
1259 sess->disc_state = DSC_DELETE_PEND; in qlt_schedule_sess_for_deletion()
1261 qla24xx_chk_fcp_state(sess); in qlt_schedule_sess_for_deletion()
1263 ql_dbg(ql_dbg_tgt, sess->vha, 0xe001, in qlt_schedule_sess_for_deletion()
1264 "Scheduling sess %p for deletion\n", sess); in qlt_schedule_sess_for_deletion()
1266 INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn); in qlt_schedule_sess_for_deletion()
1267 WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work)); in qlt_schedule_sess_for_deletion()
1272 struct fc_port *sess; in qlt_clear_tgt_db() local
1275 list_for_each_entry(sess, &vha->vp_fcports, list) { in qlt_clear_tgt_db()
1276 if (sess->se_sess) in qlt_clear_tgt_db()
1277 qlt_schedule_sess_for_deletion(sess); in qlt_clear_tgt_db()
1342 struct fc_port *sess = fcport; in qlt_create_sess() local
1349 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_create_sess()
1352 __func__, sess->port_name); in qlt_create_sess()
1357 sess->tgt = vha->vha_tgt.qla_tgt; in qlt_create_sess()
1358 sess->local = local; in qlt_create_sess()
1366 sess->logout_on_delete = 1; in qlt_create_sess()
1367 sess->keep_nport_handle = 0; in qlt_create_sess()
1368 sess->logout_completed = 0; in qlt_create_sess()
1371 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1382 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_create_sess()
1385 __func__, sess->port_name); in qlt_create_sess()
1390 if (!IS_SW_RESV_ADDR(sess->d_id)) in qlt_create_sess()
1393 qlt_do_generation_tick(vha, &sess->generation); in qlt_create_sess()
1399 sess, sess->se_sess, vha->vha_tgt.qla_tgt, in qlt_create_sess()
1406 fcport->loop_id, sess->d_id.b.domain, sess->d_id.b.area, in qlt_create_sess()
1407 sess->d_id.b.al_pa, sess->conf_compl_supported ? "" : "not "); in qlt_create_sess()
1409 return sess; in qlt_create_sess()
1420 struct fc_port *sess = fcport; in qlt_fc_port_deleted() local
1434 if (!sess->se_sess) { in qlt_fc_port_deleted()
1439 if (max_gen - sess->generation < 0) { in qlt_fc_port_deleted()
1444 sess->se_sess, sess, sess->port_name, max_gen, in qlt_fc_port_deleted()
1445 sess->generation); in qlt_fc_port_deleted()
1449 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %p", sess); in qlt_fc_port_deleted()
1451 sess->local = 1; in qlt_fc_port_deleted()
1453 qlt_schedule_sess_for_deletion(sess); in qlt_fc_port_deleted()
2004 struct abts_recv_from_24xx *abts, struct fc_port *sess) in __qlt_24xx_handle_abts() argument
2029 mcmd->sess = sess; in __qlt_24xx_handle_abts()
2045 abort_cmd = ha->tgt.tgt_ops->find_cmd_by_tag(sess, in __qlt_24xx_handle_abts()
2066 struct fc_port *sess; in qlt_24xx_handle_abts() local
2101 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id); in qlt_24xx_handle_abts()
2102 if (!sess) { in qlt_24xx_handle_abts()
2115 if (sess->deleted) { in qlt_24xx_handle_abts()
2121 rc = __qlt_24xx_handle_abts(vha, abts, sess); in qlt_24xx_handle_abts()
2159 ctio->nport_handle = mcmd->sess->loop_id; in qlt_24xx_send_task_mgmt_ctio()
2218 ctio->nport_handle = cmd->sess->loop_id; in qlt_send_resp_ctio()
2263 struct scsi_qla_host *vha = mcmd->sess->vha; in qlt_xmit_tm_rsp()
2297 mcmd->sess->port_name, mcmd->fc_tm_rsp, in qlt_xmit_tm_rsp()
2299 qlt_schedule_sess_for_deletion(mcmd->sess); in qlt_xmit_tm_rsp()
3165 if (cmd->sess && cmd->sess->deleted) { in qlt_xmit_response()
3167 if (cmd->sess->logout_completed) in qlt_xmit_response()
3333 (cmd->sess && cmd->sess->deleted)) { in qlt_rdy_to_xfer()
3765 struct fc_port *sess = cmd->sess; in qlt_free_cmd() local
3785 if (!sess || !sess->se_sess) { in qlt_free_cmd()
3790 target_free_tag(sess->se_sess, &cmd->se_cmd); in qlt_free_cmd()
3971 if (logged_out && cmd->sess) { in qlt_do_ctio_completion()
3976 cmd->sess->logout_on_delete = 0; in qlt_do_ctio_completion()
3977 cmd->sess->send_els_logo = 1; in qlt_do_ctio_completion()
3980 __func__, __LINE__, cmd->sess->port_name); in qlt_do_ctio_completion()
3982 qlt_schedule_sess_for_deletion(cmd->sess); in qlt_do_ctio_completion()
4093 struct fc_port *sess = cmd->sess; in __qlt_do_work() local
4138 ha->tgt.tgt_ops->put_sess(sess); in __qlt_do_work()
4153 target_free_tag(sess->se_sess, &cmd->se_cmd); in __qlt_do_work()
4157 ha->tgt.tgt_ops->put_sess(sess); in __qlt_do_work()
4279 struct fc_port *sess, in qlt_get_tag() argument
4282 struct se_session *se_sess = sess->se_sess; in qlt_get_tag()
4300 cmd->sess = sess; in qlt_get_tag()
4301 cmd->loop_id = sess->loop_id; in qlt_get_tag()
4302 cmd->conf_compl_supported = sess->conf_compl_supported; in qlt_get_tag()
4322 struct fc_port *sess; in qlt_handle_cmd_for_atio() local
4339 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, atio->u.isp24.fcp_hdr.s_id); in qlt_handle_cmd_for_atio()
4340 if (unlikely(!sess)) in qlt_handle_cmd_for_atio()
4345 if (sess->deleted) { in qlt_handle_cmd_for_atio()
4348 sess); in qlt_handle_cmd_for_atio()
4355 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_handle_cmd_for_atio()
4358 __func__, sess->port_name, in qlt_handle_cmd_for_atio()
4363 cmd = qlt_get_tag(vha, sess, atio); in qlt_handle_cmd_for_atio()
4368 ha->tgt.tgt_ops->put_sess(sess); in qlt_handle_cmd_for_atio()
4398 static int qlt_issue_task_mgmt(struct fc_port *sess, u64 lun, in qlt_issue_task_mgmt() argument
4401 struct scsi_qla_host *vha = sess->vha; in qlt_issue_task_mgmt()
4416 mcmd->sess = sess; in qlt_issue_task_mgmt()
4463 struct fc_port *sess; in qlt_handle_task_mgmt() local
4471 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, in qlt_handle_task_mgmt()
4478 if (sess == NULL || sess->deleted) in qlt_handle_task_mgmt()
4481 return qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_handle_task_mgmt()
4486 struct imm_ntfy_from_isp *iocb, struct fc_port *sess) in __qlt_abort_task() argument
4503 mcmd->sess = sess; in __qlt_abort_task()
4531 struct fc_port *sess; in qlt_abort_task() local
4538 sess = ha->tgt.tgt_ops->find_sess_by_loop_id(vha, loop_id); in qlt_abort_task()
4541 if (sess == NULL) { in qlt_abort_task()
4549 return __qlt_abort_task(vha, iocb, sess); in qlt_abort_task()
4581 struct fc_port *sess = NULL, *other_sess; in qlt_find_sess_invalidate_other() local
4591 WARN_ON(sess); in qlt_find_sess_invalidate_other()
4592 sess = other_sess; in qlt_find_sess_invalidate_other()
4640 return sess; in qlt_find_sess_invalidate_other()
4689 struct fc_port *sess = NULL, *conflict_sess = NULL; in qlt_handle_login() local
4711 sess = qlt_find_sess_invalidate_other(vha, wwn, in qlt_handle_login()
4737 if (!sess) { in qlt_handle_login()
4755 qlt_plogi_ack_link(vha, pla, sess, QLT_PLOGI_LINK_SAME_WWN); in qlt_handle_login()
4756 sess->d_id = port_id; in qlt_handle_login()
4757 sess->login_gen++; in qlt_handle_login()
4760 sess->fw_login_state = DSC_LS_PRLI_PEND; in qlt_handle_login()
4761 sess->local = 0; in qlt_handle_login()
4762 sess->loop_id = loop_id; in qlt_handle_login()
4763 sess->d_id = port_id; in qlt_handle_login()
4764 sess->fw_login_state = DSC_LS_PRLI_PEND; in qlt_handle_login()
4768 sess->conf_compl_supported = 1; in qlt_handle_login()
4771 sess->port_type = FCT_INITIATOR; in qlt_handle_login()
4773 sess->port_type = FCT_TARGET; in qlt_handle_login()
4776 sess->fw_login_state = DSC_LS_PLOGI_PEND; in qlt_handle_login()
4781 __func__, __LINE__, sess->port_name, sess->disc_state); in qlt_handle_login()
4783 switch (sess->disc_state) { in qlt_handle_login()
4807 sess->keep_nport_handle = ((sess->loop_id == loop_id) && in qlt_handle_login()
4808 (sess->d_id.b24 == port_id.b24)); in qlt_handle_login()
4812 __func__, __LINE__, sess->port_name); in qlt_handle_login()
4815 qlt_schedule_sess_for_deletion(sess); in qlt_handle_login()
4830 struct fc_port *sess = NULL, *conflict_sess = NULL; in qlt_24xx_handle_els() local
4864 sess = qla2x00_find_fcport_by_wwpn(vha, in qlt_24xx_handle_els()
4867 if (sess && sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN]) { in qlt_24xx_handle_els()
4889 sess = qlt_find_sess_invalidate_other(vha, wwn, port_id, in qlt_24xx_handle_els()
4911 if (sess != NULL) { in qlt_24xx_handle_els()
4914 switch (sess->fw_login_state) { in qlt_24xx_handle_els()
4924 switch (sess->disc_state) { in qlt_24xx_handle_els()
4944 ql_log(ql_log_warn, sess->vha, 0xf095, in qlt_24xx_handle_els()
4946 sess); in qlt_24xx_handle_els()
4958 sess->loop_id, sess, iocb->u.isp24.nport_handle); in qlt_24xx_handle_els()
4960 sess->local = 0; in qlt_24xx_handle_els()
4961 sess->loop_id = loop_id; in qlt_24xx_handle_els()
4962 sess->d_id = port_id; in qlt_24xx_handle_els()
4963 sess->fw_login_state = DSC_LS_PRLI_PEND; in qlt_24xx_handle_els()
4966 sess->conf_compl_supported = 1; in qlt_24xx_handle_els()
4969 sess->port_type = FCT_INITIATOR; in qlt_24xx_handle_els()
4971 sess->port_type = FCT_TARGET; in qlt_24xx_handle_els()
4979 if (sess) { in qlt_24xx_handle_els()
4982 __func__, __LINE__, sess->port_name); in qlt_24xx_handle_els()
4983 qla24xx_post_nack_work(vha, sess, iocb, in qlt_24xx_handle_els()
4992 if (sess) { in qlt_24xx_handle_els()
4995 __func__, __LINE__, sess->port_name); in qlt_24xx_handle_els()
4996 qla24xx_post_nack_work(vha, sess, iocb, in qlt_24xx_handle_els()
5015 sess = qla2x00_find_fcport_by_loopid(vha, loop_id); in qlt_24xx_handle_els()
5018 if (sess) { in qlt_24xx_handle_els()
5019 sess->login_gen++; in qlt_24xx_handle_els()
5020 sess->fw_login_state = DSC_LS_LOGO_PEND; in qlt_24xx_handle_els()
5021 sess->logo_ack_needed = 1; in qlt_24xx_handle_els()
5022 memcpy(sess->iocb, iocb, IOCB_SIZE); in qlt_24xx_handle_els()
5029 __func__, wwn, res, sess); in qlt_24xx_handle_els()
5035 BUG_ON(!sess); in qlt_24xx_handle_els()
5039 if (sess) { in qlt_24xx_handle_els()
5040 qlt_schedule_sess_for_deletion(sess); in qlt_24xx_handle_els()
5056 sess = qla2x00_find_fcport_by_wwpn(vha, in qlt_24xx_handle_els()
5058 if (sess) { in qlt_24xx_handle_els()
5061 sess, sess->loop_id, loop_id, in qlt_24xx_handle_els()
5062 sess->disc_state, sess->fw_login_state); in qlt_24xx_handle_els()
5227 struct fc_port *sess = NULL; in __qlt_send_busy() local
5238 sess = qla2x00_find_fcport_by_nportid(vha, &id, 1); in __qlt_send_busy()
5240 if (!sess) { in __qlt_send_busy()
5260 ctio24->nport_handle = sess->loop_id; in __qlt_send_busy()
5303 struct fc_port *sess; in qlt_alloc_qfull_cmd() local
5331 sess = ha->tgt.tgt_ops->find_sess_by_s_id in qlt_alloc_qfull_cmd()
5333 if (!sess) in qlt_alloc_qfull_cmd()
5336 se_sess = sess->se_sess; in qlt_alloc_qfull_cmd()
5994 struct fc_port *sess = NULL; in qlt_make_local_sess() local
6053 sess = qlt_create_sess(vha, fcport, true); in qlt_make_local_sess()
6057 return sess; in qlt_make_local_sess()
6065 struct fc_port *sess = NULL; in qlt_abort_work() local
6080 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, in qlt_abort_work()
6082 if (!sess) { in qlt_abort_work()
6085 sess = qlt_make_local_sess(vha, s_id); in qlt_abort_work()
6089 if (!sess) in qlt_abort_work()
6092 if (sess->deleted) { in qlt_abort_work()
6093 sess = NULL; in qlt_abort_work()
6097 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_abort_work()
6100 __func__, sess->port_name); in qlt_abort_work()
6101 sess = NULL; in qlt_abort_work()
6106 rc = __qlt_24xx_handle_abts(vha, &prm->abts, sess); in qlt_abort_work()
6107 ha->tgt.tgt_ops->put_sess(sess); in qlt_abort_work()
6115 if (sess) in qlt_abort_work()
6116 ha->tgt.tgt_ops->put_sess(sess); in qlt_abort_work()
6132 struct fc_port *sess = NULL; in qlt_tmr_work() local
6146 sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, s_id); in qlt_tmr_work()
6147 if (!sess) { in qlt_tmr_work()
6150 sess = qlt_make_local_sess(vha, s_id); in qlt_tmr_work()
6154 if (!sess) in qlt_tmr_work()
6157 if (sess->deleted) { in qlt_tmr_work()
6158 sess = NULL; in qlt_tmr_work()
6162 if (!kref_get_unless_zero(&sess->sess_kref)) { in qlt_tmr_work()
6165 __func__, sess->port_name); in qlt_tmr_work()
6166 sess = NULL; in qlt_tmr_work()
6176 rc = qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_tmr_work()
6177 ha->tgt.tgt_ops->put_sess(sess); in qlt_tmr_work()
6185 if (sess) in qlt_tmr_work()
6186 ha->tgt.tgt_ops->put_sess(sess); in qlt_tmr_work()