Lines Matching refs:tgt

22 static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
63 struct bnx2fc_rport *tgt = aborted_io_req->tgt; in bnx2fc_send_rrq() local
64 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_rrq()
66 u32 sid = tgt->sid; in bnx2fc_send_rrq()
90 rc = bnx2fc_initiate_els(tgt, ELS_RRQ, &rrq, sizeof(rrq), in bnx2fc_send_rrq()
107 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_rrq()
109 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_rrq()
117 struct bnx2fc_rport *tgt; in bnx2fc_l2_els_compl() local
145 tgt = els_req->tgt; in bnx2fc_l2_els_compl()
166 bnx2fc_process_l2_frame_compl(tgt, buf, frame_len, l2_oxid); in bnx2fc_l2_els_compl()
174 int bnx2fc_send_adisc(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_adisc() argument
179 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_adisc()
195 rc = bnx2fc_initiate_els(tgt, ELS_ADISC, adisc, sizeof(*adisc), in bnx2fc_send_adisc()
202 int bnx2fc_send_logo(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_logo() argument
207 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_logo()
223 rc = bnx2fc_initiate_els(tgt, ELS_LOGO, logo, sizeof(*logo), in bnx2fc_send_logo()
230 int bnx2fc_send_rls(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_rls() argument
235 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_rls()
250 rc = bnx2fc_initiate_els(tgt, ELS_RLS, rls, sizeof(*rls), in bnx2fc_send_rls()
291 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_srr_compl() local
292 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_srr_compl()
296 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_srr_compl()
375 struct bnx2fc_rport *tgt; in bnx2fc_rec_compl() local
394 tgt = orig_io_req->tgt; in bnx2fc_rec_compl()
411 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
413 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
473 new_io_req = bnx2fc_cmd_alloc(tgt); in bnx2fc_rec_compl()
483 rc = bnx2fc_post_io_req(tgt, new_io_req); in bnx2fc_rec_compl()
555 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
557 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
577 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_send_rec() local
578 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_rec()
580 u32 sid = tgt->sid; in bnx2fc_send_rec()
602 rc = bnx2fc_initiate_els(tgt, ELS_REC, &rec, sizeof(rec), in bnx2fc_send_rec()
608 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_rec()
610 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_rec()
619 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_send_srr() local
620 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_srr()
646 rc = bnx2fc_initiate_els(tgt, ELS_SRR, &srr, sizeof(srr), in bnx2fc_send_srr()
652 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_srr()
654 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_srr()
662 static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op, in bnx2fc_initiate_els() argument
667 struct fcoe_port *port = tgt->port; in bnx2fc_initiate_els()
669 struct fc_rport *rport = tgt->rport; in bnx2fc_initiate_els()
692 if (!(test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) || in bnx2fc_initiate_els()
693 (test_bit(BNX2FC_FLAG_EXPL_LOGO, &tgt->flags))) { in bnx2fc_initiate_els()
698 els_req = bnx2fc_elstm_alloc(tgt, BNX2FC_ELS); in bnx2fc_initiate_els()
706 els_req->tgt = tgt; in bnx2fc_initiate_els()
715 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
717 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
736 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
738 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
748 did = tgt->rport->port_id; in bnx2fc_initiate_els()
749 sid = tgt->sid; in bnx2fc_initiate_els()
771 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
773 if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) { in bnx2fc_initiate_els()
778 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
784 bnx2fc_add_2_sq(tgt, xid); in bnx2fc_initiate_els()
787 list_add_tail(&els_req->link, &tgt->els_queue); in bnx2fc_initiate_els()
790 bnx2fc_ring_doorbell(tgt); in bnx2fc_initiate_els()
791 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()