Lines Matching refs:sess

269 	spin_lock_irqsave(&cmd->sess->sess_cmd_lock, flags);  in tcm_qla2xxx_complete_free()
271 spin_unlock_irqrestore(&cmd->sess->sess_cmd_lock, flags); in tcm_qla2xxx_complete_free()
276 static struct qla_tgt_cmd *tcm_qla2xxx_get_cmd(struct fc_port *sess) in tcm_qla2xxx_get_cmd() argument
278 struct se_session *se_sess = sess->se_sess; in tcm_qla2xxx_get_cmd()
296 target_free_tag(cmd->sess->se_sess, &cmd->se_cmd); in tcm_qla2xxx_rel_cmd()
354 struct fc_port *sess = container_of(kref, in tcm_qla2xxx_release_session() local
357 qlt_unreg_sess(sess); in tcm_qla2xxx_release_session()
360 static void tcm_qla2xxx_put_sess(struct fc_port *sess) in tcm_qla2xxx_put_sess() argument
362 if (!sess) in tcm_qla2xxx_put_sess()
365 kref_put(&sess->sess_kref, tcm_qla2xxx_release_session); in tcm_qla2xxx_put_sess()
370 struct fc_port *sess = se_sess->fabric_sess_ptr; in tcm_qla2xxx_close_session() local
372 BUG_ON(!sess); in tcm_qla2xxx_close_session()
376 sess->explicit_logout = 1; in tcm_qla2xxx_close_session()
377 tcm_qla2xxx_put_sess(sess); in tcm_qla2xxx_close_session()
449 struct fc_port *sess; in tcm_qla2xxx_handle_cmd() local
463 sess = cmd->sess; in tcm_qla2xxx_handle_cmd()
464 if (!sess) { in tcm_qla2xxx_handle_cmd()
469 se_sess = sess->se_sess; in tcm_qla2xxx_handle_cmd()
485 spin_lock_irqsave(&sess->sess_cmd_lock, flags); in tcm_qla2xxx_handle_cmd()
486 list_add_tail(&cmd->sess_cmd_list, &sess->sess_cmd_list); in tcm_qla2xxx_handle_cmd()
487 spin_unlock_irqrestore(&sess->sess_cmd_lock, flags); in tcm_qla2xxx_handle_cmd()
588 struct fc_port *sess = mcmd->sess; in tcm_qla2xxx_handle_tmr() local
594 pr_debug("%ld: ABTS received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
598 pr_debug("%ld: 2G Abort Task received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
602 pr_debug("%ld: CLEAR_ACA received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
606 pr_debug("%ld: TARGET_RESET received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
610 pr_debug("%ld: LUN_RESET received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
614 pr_debug("%ld: CLEAR_TS received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
618 pr_debug("%ld: ABORT_TS received\n", sess->vha->host_no); in tcm_qla2xxx_handle_tmr()
623 sess->vha->host_no, tmr_func); in tcm_qla2xxx_handle_tmr()
627 return target_submit_tmr(se_cmd, sess->se_sess, NULL, lun, mcmd, in tcm_qla2xxx_handle_tmr()
631 static struct qla_tgt_cmd *tcm_qla2xxx_find_cmd_by_tag(struct fc_port *sess, in tcm_qla2xxx_find_cmd_by_tag() argument
637 if (!sess->se_sess) in tcm_qla2xxx_find_cmd_by_tag()
640 spin_lock_irqsave(&sess->sess_cmd_lock, flags); in tcm_qla2xxx_find_cmd_by_tag()
641 list_for_each_entry(cmd, &sess->sess_cmd_list, sess_cmd_list) { in tcm_qla2xxx_find_cmd_by_tag()
647 spin_unlock_irqrestore(&sess->sess_cmd_lock, flags); in tcm_qla2xxx_find_cmd_by_tag()
781 spin_lock_irqsave(&cmd->sess->sess_cmd_lock, flags); in tcm_qla2xxx_aborted_task()
783 spin_unlock_irqrestore(&cmd->sess->sess_cmd_lock, flags); in tcm_qla2xxx_aborted_task()
793 static void tcm_qla2xxx_clear_nacl_from_fcport_map(struct fc_port *sess) in tcm_qla2xxx_clear_nacl_from_fcport_map() argument
795 struct se_node_acl *se_nacl = sess->se_sess->se_node_acl; in tcm_qla2xxx_clear_nacl_from_fcport_map()
829 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess); in tcm_qla2xxx_clear_nacl_from_fcport_map()
832 static void tcm_qla2xxx_shutdown_sess(struct fc_port *sess) in tcm_qla2xxx_shutdown_sess() argument
834 target_stop_session(sess->se_sess); in tcm_qla2xxx_shutdown_sess()
1340 struct tcm_qla2xxx_nacl *nacl, struct fc_port *sess) in tcm_qla2xxx_clear_sess_lookup() argument
1342 struct se_session *se_sess = sess->se_sess; in tcm_qla2xxx_clear_sess_lookup()
1345 sess, port_id_to_be_id(sess->d_id)); in tcm_qla2xxx_clear_sess_lookup()
1347 sess, sess->loop_id); in tcm_qla2xxx_clear_sess_lookup()
1350 static void tcm_qla2xxx_free_session(struct fc_port *sess) in tcm_qla2xxx_free_session() argument
1352 struct qla_tgt *tgt = sess->tgt; in tcm_qla2xxx_free_session()
1358 se_sess = sess->se_sess; in tcm_qla2xxx_free_session()
1455 static void tcm_qla2xxx_update_sess(struct fc_port *sess, port_id_t s_id, in tcm_qla2xxx_update_sess() argument
1458 struct qla_tgt *tgt = sess->tgt; in tcm_qla2xxx_update_sess()
1462 struct se_node_acl *se_nacl = sess->se_sess->se_node_acl; in tcm_qla2xxx_update_sess()
1468 if (sess->loop_id != loop_id || sess->d_id.b24 != s_id.b24) in tcm_qla2xxx_update_sess()
1470 sess, sess->port_name, in tcm_qla2xxx_update_sess()
1471 sess->loop_id, loop_id, sess->d_id.b.domain, in tcm_qla2xxx_update_sess()
1472 sess->d_id.b.area, sess->d_id.b.al_pa, s_id.b.domain, in tcm_qla2xxx_update_sess()
1475 if (sess->loop_id != loop_id) { in tcm_qla2xxx_update_sess()
1484 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl) in tcm_qla2xxx_update_sess()
1485 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL; in tcm_qla2xxx_update_sess()
1489 sess->loop_id = loop_id; in tcm_qla2xxx_update_sess()
1492 if (sess->d_id.b24 != s_id.b24) { in tcm_qla2xxx_update_sess()
1493 key = (((u32) sess->d_id.b.domain << 16) | in tcm_qla2xxx_update_sess()
1494 ((u32) sess->d_id.b.area << 8) | in tcm_qla2xxx_update_sess()
1495 ((u32) sess->d_id.b.al_pa)); in tcm_qla2xxx_update_sess()
1500 sess->d_id.b.domain, sess->d_id.b.area, in tcm_qla2xxx_update_sess()
1501 sess->d_id.b.al_pa); in tcm_qla2xxx_update_sess()
1504 sess->d_id.b.domain, sess->d_id.b.area, in tcm_qla2xxx_update_sess()
1505 sess->d_id.b.al_pa); in tcm_qla2xxx_update_sess()
1520 sess->d_id = s_id; in tcm_qla2xxx_update_sess()
1524 sess->conf_compl_supported = conf_compl_supported; in tcm_qla2xxx_update_sess()