Lines Matching refs:tgt

23 static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
64 struct bnx2fc_rport *tgt = aborted_io_req->tgt; in bnx2fc_send_rrq() local
72 if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) in bnx2fc_send_rrq()
75 lport = tgt->rdata->local_port; in bnx2fc_send_rrq()
76 sid = tgt->sid; in bnx2fc_send_rrq()
98 rc = bnx2fc_initiate_els(tgt, ELS_RRQ, &rrq, sizeof(rrq), in bnx2fc_send_rrq()
115 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_rrq()
117 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_rrq()
125 struct bnx2fc_rport *tgt; in bnx2fc_l2_els_compl() local
153 tgt = els_req->tgt; in bnx2fc_l2_els_compl()
174 bnx2fc_process_l2_frame_compl(tgt, buf, frame_len, l2_oxid); in bnx2fc_l2_els_compl()
182 int bnx2fc_send_adisc(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_adisc() argument
187 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_adisc()
203 rc = bnx2fc_initiate_els(tgt, ELS_ADISC, adisc, sizeof(*adisc), in bnx2fc_send_adisc()
210 int bnx2fc_send_logo(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_logo() argument
215 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_logo()
231 rc = bnx2fc_initiate_els(tgt, ELS_LOGO, logo, sizeof(*logo), in bnx2fc_send_logo()
238 int bnx2fc_send_rls(struct bnx2fc_rport *tgt, struct fc_frame *fp) in bnx2fc_send_rls() argument
243 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_rls()
258 rc = bnx2fc_initiate_els(tgt, ELS_RLS, rls, sizeof(*rls), in bnx2fc_send_rls()
299 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_srr_compl() local
300 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_srr_compl()
304 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_srr_compl()
383 struct bnx2fc_rport *tgt; in bnx2fc_rec_compl() local
402 tgt = orig_io_req->tgt; in bnx2fc_rec_compl()
419 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
421 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
481 new_io_req = bnx2fc_cmd_alloc(tgt); in bnx2fc_rec_compl()
491 rc = bnx2fc_post_io_req(tgt, new_io_req); in bnx2fc_rec_compl()
563 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
565 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_rec_compl()
585 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_send_rec() local
586 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_rec()
588 u32 sid = tgt->sid; in bnx2fc_send_rec()
610 rc = bnx2fc_initiate_els(tgt, ELS_REC, &rec, sizeof(rec), in bnx2fc_send_rec()
615 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_rec()
617 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_rec()
627 struct bnx2fc_rport *tgt = orig_io_req->tgt; in bnx2fc_send_srr() local
628 struct fc_lport *lport = tgt->rdata->local_port; in bnx2fc_send_srr()
654 rc = bnx2fc_initiate_els(tgt, ELS_SRR, &srr, sizeof(srr), in bnx2fc_send_srr()
659 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_send_srr()
661 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_send_srr()
670 static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op, in bnx2fc_initiate_els() argument
675 struct fcoe_port *port = tgt->port; in bnx2fc_initiate_els()
677 struct fc_rport *rport = tgt->rport; in bnx2fc_initiate_els()
700 if (!(test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags))) { in bnx2fc_initiate_els()
705 els_req = bnx2fc_elstm_alloc(tgt, BNX2FC_ELS); in bnx2fc_initiate_els()
713 els_req->tgt = tgt; in bnx2fc_initiate_els()
723 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
725 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
744 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
746 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
756 did = tgt->rport->port_id; in bnx2fc_initiate_els()
757 sid = tgt->sid; in bnx2fc_initiate_els()
779 spin_lock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
781 if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) { in bnx2fc_initiate_els()
786 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()
792 bnx2fc_add_2_sq(tgt, xid); in bnx2fc_initiate_els()
795 list_add_tail(&els_req->link, &tgt->els_queue); in bnx2fc_initiate_els()
798 bnx2fc_ring_doorbell(tgt); in bnx2fc_initiate_els()
799 spin_unlock_bh(&tgt->tgt_lock); in bnx2fc_initiate_els()