Lines Matching refs:lport

87 	struct fc_lport	*lport;  member
464 static int fc_seq_send_locked(struct fc_lport *lport, struct fc_seq *sp, in fc_seq_send_locked() argument
500 error = lport->tt.frame_send(lport, fp); in fc_seq_send_locked()
526 int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, struct fc_frame *fp) in fc_seq_send() argument
532 error = fc_seq_send_locked(lport, sp, fp); in fc_seq_send()
813 static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, in fc_exch_em_alloc() argument
880 ep->lp = lport; in fc_exch_em_alloc()
907 static struct fc_exch *fc_exch_alloc(struct fc_lport *lport, in fc_exch_alloc() argument
913 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
915 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
930 struct fc_lport *lport = mp->lport; in fc_exch_find() local
940 lport->host->host_no, lport->port_id, xid, cpu); in fc_exch_find()
949 FC_LPORT_DBG(lport, "xid %x quarantined\n", xid); in fc_exch_find()
992 static struct fc_exch *fc_exch_resp(struct fc_lport *lport, in fc_exch_resp() argument
999 ep = fc_exch_alloc(lport, fp); in fc_exch_resp()
1040 static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, in fc_seq_lookup_recip() argument
1095 ep = fc_exch_resp(lport, mp, fp); in fc_seq_lookup_recip()
1283 struct fc_lport *lport = ep->lp; in fc_seq_send_ack() local
1290 fp = fc_frame_alloc(lport, 0); in fc_seq_send_ack()
1327 lport->tt.frame_send(lport, fp); in fc_seq_send_ack()
1348 struct fc_lport *lport; in fc_exch_send_ba_rjt() local
1351 lport = fr_dev(rx_fp); in fc_exch_send_ba_rjt()
1353 fp = fc_frame_alloc(lport, sizeof(*rp)); in fc_exch_send_ba_rjt()
1401 lport->tt.frame_send(lport, fp); in fc_exch_send_ba_rjt()
1476 struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) in fc_seq_assign() argument
1480 WARN_ON(lport != fr_dev(fp)); in fc_seq_assign()
1484 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1486 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1511 static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp, in fc_exch_recv_req() argument
1522 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1523 if (!lport) { in fc_exch_recv_req()
1527 fr_dev(fp) = lport; in fc_exch_recv_req()
1536 return fc_lport_recv(lport, fp); in fc_exch_recv_req()
1538 reject = fc_seq_lookup_recip(lport, mp, fp); in fc_exch_recv_req()
1557 fc_lport_recv(lport, fp); in fc_exch_recv_req()
1560 FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n", in fc_exch_recv_req()
1833 struct fc_lport *lport; in fc_seq_ls_acc() local
1838 lport = fr_dev(rx_fp); in fc_seq_ls_acc()
1840 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_seq_ls_acc()
1850 lport->tt.frame_send(lport, fp); in fc_seq_ls_acc()
1865 struct fc_lport *lport; in fc_seq_ls_rjt() local
1870 lport = fr_dev(rx_fp); in fc_seq_ls_rjt()
1872 fp = fc_frame_alloc(lport, sizeof(*rjt)); in fc_seq_ls_rjt()
1884 lport->tt.frame_send(lport, fp); in fc_seq_ls_rjt()
1936 static void fc_exch_pool_reset(struct fc_lport *lport, in fc_exch_pool_reset() argument
1946 if ((lport == ep->lp) && in fc_exch_pool_reset()
1981 void fc_exch_mgr_reset(struct fc_lport *lport, u32 sid, u32 did) in fc_exch_mgr_reset() argument
1986 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1988 fc_exch_pool_reset(lport, in fc_exch_mgr_reset()
2002 static struct fc_exch *fc_exch_lookup(struct fc_lport *lport, u32 xid) in fc_exch_lookup() argument
2006 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2020 struct fc_lport *lport; in fc_exch_els_rec() local
2030 lport = fr_dev(rfp); in fc_exch_els_rec()
2040 if (sid == fc_host_port_id(lport->host)) in fc_exch_els_rec()
2045 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2050 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rec()
2052 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2063 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_exch_els_rec()
2084 lport->tt.frame_send(lport, fp); in fc_exch_els_rec()
2177 struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, in fc_exch_seq_send() argument
2191 ep = fc_exch_alloc(lport, fp); in fc_exch_seq_send()
2202 ep->r_a_tov = lport->r_a_tov; in fc_exch_seq_send()
2203 ep->lp = lport; in fc_exch_seq_send()
2211 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2216 if (unlikely(lport->tt.frame_send(lport, fp))) in fc_exch_seq_send()
2247 struct fc_lport *lport; in fc_exch_rrq() local
2252 lport = ep->lp; in fc_exch_rrq()
2254 fp = fc_frame_alloc(lport, sizeof(*rrq)); in fc_exch_rrq()
2270 lport->port_id, FC_TYPE_ELS, in fc_exch_rrq()
2273 if (fc_exch_seq_send(lport, fp, fc_exch_rrq_resp, NULL, ep, in fc_exch_rrq()
2274 lport->e_d_tov)) in fc_exch_rrq()
2297 struct fc_lport *lport; in fc_exch_els_rrq() local
2304 lport = fr_dev(fp); in fc_exch_els_rrq()
2314 xid = fc_host_port_id(lport->host) == sid ? in fc_exch_els_rrq()
2316 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rrq()
2363 void fc_exch_update_stats(struct fc_lport *lport) in fc_exch_update_stats() argument
2369 st = &lport->host_stats; in fc_exch_update_stats()
2371 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2390 struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport, in fc_exch_mgr_add() argument
2403 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2464 struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport, in fc_exch_mgr_alloc() argument
2477 FC_LPORT_DBG(lport, "Invalid min_xid 0x:%x and max_xid 0x:%x\n", in fc_exch_mgr_alloc()
2490 mp->lport = lport; in fc_exch_mgr_alloc()
2534 if (!fc_exch_mgr_add(lport, mp, match)) { in fc_exch_mgr_alloc()
2559 void fc_exch_mgr_free(struct fc_lport *lport) in fc_exch_mgr_free() argument
2564 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2577 struct fc_lport *lport, in fc_find_ema() argument
2588 return list_entry(lport->ema_list.prev, in fc_find_ema()
2592 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2604 void fc_exch_recv(struct fc_lport *lport, struct fc_frame *fp) in fc_exch_recv() argument
2611 if (!lport || lport->state == LPORT_ST_DISABLED) { in fc_exch_recv()
2619 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2621 FC_LPORT_DBG(lport, "Unable to find Exchange Manager Anchor," in fc_exch_recv()
2648 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()
2651 FC_LPORT_DBG(lport, "dropping invalid frame (eof %x)", in fc_exch_recv()
2662 int fc_exch_init(struct fc_lport *lport) in fc_exch_init() argument
2664 if (!lport->tt.exch_mgr_reset) in fc_exch_init()
2665 lport->tt.exch_mgr_reset = fc_exch_mgr_reset; in fc_exch_init()