Lines Matching refs:sess
271 static struct qla_tgt_cmd *tcm_qla2xxx_get_cmd(struct fc_port *sess)
273 struct se_session *se_sess = sess->se_sess;
291 target_free_tag(cmd->sess->se_sess, &cmd->se_cmd);
349 struct fc_port *sess = container_of(kref,
352 qlt_unreg_sess(sess);
355 static void tcm_qla2xxx_put_sess(struct fc_port *sess)
357 if (!sess)
360 kref_put(&sess->sess_kref, tcm_qla2xxx_release_session);
365 struct fc_port *sess = se_sess->fabric_sess_ptr;
369 BUG_ON(!sess);
370 vha = sess->vha;
376 sess->explicit_logout = 1;
377 tcm_qla2xxx_put_sess(sess);
449 struct fc_port *sess;
462 sess = cmd->sess;
463 if (!sess) {
468 se_sess = sess->se_sess;
574 struct fc_port *sess = mcmd->sess;
581 pr_debug("%ld: ABTS received\n", sess->vha->host_no);
586 pr_debug("%ld: 2G Abort Task received\n", sess->vha->host_no);
590 pr_debug("%ld: CLEAR_ACA received\n", sess->vha->host_no);
594 pr_debug("%ld: TARGET_RESET received\n", sess->vha->host_no);
598 pr_debug("%ld: LUN_RESET received\n", sess->vha->host_no);
602 pr_debug("%ld: CLEAR_TS received\n", sess->vha->host_no);
606 pr_debug("%ld: ABORT_TS received\n", sess->vha->host_no);
611 sess->vha->host_no, tmr_func);
615 return target_submit_tmr(se_cmd, sess->se_sess, NULL, lun, mcmd,
619 static struct qla_tgt_cmd *tcm_qla2xxx_find_cmd_by_tag(struct fc_port *sess,
626 if (!sess->se_sess)
629 spin_lock_irqsave(&sess->se_sess->sess_cmd_lock, flags);
630 list_for_each_entry(secmd, &sess->se_sess->sess_cmd_list, se_cmd_list) {
640 spin_unlock_irqrestore(&sess->se_sess->sess_cmd_lock, flags);
778 static void tcm_qla2xxx_clear_nacl_from_fcport_map(struct fc_port *sess)
780 struct se_node_acl *se_nacl = sess->se_sess->se_node_acl;
814 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess);
817 static void tcm_qla2xxx_shutdown_sess(struct fc_port *sess)
819 target_sess_cmd_list_set_waiting(sess->se_sess);
1375 struct tcm_qla2xxx_nacl *nacl, struct fc_port *sess)
1377 struct se_session *se_sess = sess->se_sess;
1380 sess, port_id_to_be_id(sess->d_id));
1382 sess, sess->loop_id);
1385 static void tcm_qla2xxx_free_session(struct fc_port *sess)
1387 struct qla_tgt *tgt = sess->tgt;
1395 se_sess = sess->se_sess;
1492 static void tcm_qla2xxx_update_sess(struct fc_port *sess, port_id_t s_id,
1495 struct qla_tgt *tgt = sess->tgt;
1499 struct se_node_acl *se_nacl = sess->se_sess->se_node_acl;
1505 if (sess->loop_id != loop_id || sess->d_id.b24 != s_id.b24)
1507 sess, sess->port_name,
1508 sess->loop_id, loop_id, sess->d_id.b.domain,
1509 sess->d_id.b.area, sess->d_id.b.al_pa, s_id.b.domain,
1512 if (sess->loop_id != loop_id) {
1521 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl)
1522 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL;
1526 sess->loop_id = loop_id;
1529 if (sess->d_id.b24 != s_id.b24) {
1530 key = (((u32) sess->d_id.b.domain << 16) |
1531 ((u32) sess->d_id.b.area << 8) |
1532 ((u32) sess->d_id.b.al_pa));
1537 sess->d_id.b.domain, sess->d_id.b.area,
1538 sess->d_id.b.al_pa);
1541 sess->d_id.b.domain, sess->d_id.b.area,
1542 sess->d_id.b.al_pa);
1557 sess->d_id = s_id;
1561 sess->conf_compl_supported = conf_compl_supported;