Lines Matching refs:lport
85 struct fc_lport *lport; member
462 static int fc_seq_send_locked(struct fc_lport *lport, struct fc_seq *sp, in fc_seq_send_locked() argument
498 error = lport->tt.frame_send(lport, fp); in fc_seq_send_locked()
524 int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, struct fc_frame *fp) in fc_seq_send() argument
530 error = fc_seq_send_locked(lport, sp, fp); in fc_seq_send()
808 static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, in fc_exch_em_alloc() argument
875 ep->lp = lport; in fc_exch_em_alloc()
902 static struct fc_exch *fc_exch_alloc(struct fc_lport *lport, in fc_exch_alloc() argument
908 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
910 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
925 struct fc_lport *lport = mp->lport; in fc_exch_find() local
935 lport->host->host_no, lport->port_id, xid, cpu); in fc_exch_find()
944 FC_LPORT_DBG(lport, "xid %x quarantined\n", xid); in fc_exch_find()
987 static struct fc_exch *fc_exch_resp(struct fc_lport *lport, in fc_exch_resp() argument
994 ep = fc_exch_alloc(lport, fp); in fc_exch_resp()
1035 static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, in fc_seq_lookup_recip() argument
1090 ep = fc_exch_resp(lport, mp, fp); in fc_seq_lookup_recip()
1278 struct fc_lport *lport = ep->lp; in fc_seq_send_ack() local
1285 fp = fc_frame_alloc(lport, 0); in fc_seq_send_ack()
1322 lport->tt.frame_send(lport, fp); in fc_seq_send_ack()
1343 struct fc_lport *lport; in fc_exch_send_ba_rjt() local
1346 lport = fr_dev(rx_fp); in fc_exch_send_ba_rjt()
1348 fp = fc_frame_alloc(lport, sizeof(*rp)); in fc_exch_send_ba_rjt()
1396 lport->tt.frame_send(lport, fp); in fc_exch_send_ba_rjt()
1471 struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) in fc_seq_assign() argument
1475 WARN_ON(lport != fr_dev(fp)); in fc_seq_assign()
1479 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1481 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1506 static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp, in fc_exch_recv_req() argument
1517 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1518 if (!lport) { in fc_exch_recv_req()
1522 fr_dev(fp) = lport; in fc_exch_recv_req()
1531 return fc_lport_recv(lport, fp); in fc_exch_recv_req()
1533 reject = fc_seq_lookup_recip(lport, mp, fp); in fc_exch_recv_req()
1552 fc_lport_recv(lport, fp); in fc_exch_recv_req()
1555 FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n", in fc_exch_recv_req()
1821 struct fc_lport *lport; in fc_seq_ls_acc() local
1826 lport = fr_dev(rx_fp); in fc_seq_ls_acc()
1828 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_seq_ls_acc()
1838 lport->tt.frame_send(lport, fp); in fc_seq_ls_acc()
1853 struct fc_lport *lport; in fc_seq_ls_rjt() local
1858 lport = fr_dev(rx_fp); in fc_seq_ls_rjt()
1860 fp = fc_frame_alloc(lport, sizeof(*rjt)); in fc_seq_ls_rjt()
1872 lport->tt.frame_send(lport, fp); in fc_seq_ls_rjt()
1918 static void fc_exch_pool_reset(struct fc_lport *lport, in fc_exch_pool_reset() argument
1928 if ((lport == ep->lp) && in fc_exch_pool_reset()
1963 void fc_exch_mgr_reset(struct fc_lport *lport, u32 sid, u32 did) in fc_exch_mgr_reset() argument
1968 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1970 fc_exch_pool_reset(lport, in fc_exch_mgr_reset()
1984 static struct fc_exch *fc_exch_lookup(struct fc_lport *lport, u32 xid) in fc_exch_lookup() argument
1988 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2002 struct fc_lport *lport; in fc_exch_els_rec() local
2012 lport = fr_dev(rfp); in fc_exch_els_rec()
2022 if (sid == fc_host_port_id(lport->host)) in fc_exch_els_rec()
2027 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2032 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rec()
2034 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2045 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_exch_els_rec()
2066 lport->tt.frame_send(lport, fp); in fc_exch_els_rec()
2159 struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, in fc_exch_seq_send() argument
2173 ep = fc_exch_alloc(lport, fp); in fc_exch_seq_send()
2184 ep->r_a_tov = lport->r_a_tov; in fc_exch_seq_send()
2185 ep->lp = lport; in fc_exch_seq_send()
2193 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2198 if (unlikely(lport->tt.frame_send(lport, fp))) in fc_exch_seq_send()
2229 struct fc_lport *lport; in fc_exch_rrq() local
2234 lport = ep->lp; in fc_exch_rrq()
2236 fp = fc_frame_alloc(lport, sizeof(*rrq)); in fc_exch_rrq()
2252 lport->port_id, FC_TYPE_ELS, in fc_exch_rrq()
2255 if (fc_exch_seq_send(lport, fp, fc_exch_rrq_resp, NULL, ep, in fc_exch_rrq()
2256 lport->e_d_tov)) in fc_exch_rrq()
2279 struct fc_lport *lport; in fc_exch_els_rrq() local
2286 lport = fr_dev(fp); in fc_exch_els_rrq()
2296 xid = fc_host_port_id(lport->host) == sid ? in fc_exch_els_rrq()
2298 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rrq()
2345 void fc_exch_update_stats(struct fc_lport *lport) in fc_exch_update_stats() argument
2351 st = &lport->host_stats; in fc_exch_update_stats()
2353 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2372 struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport, in fc_exch_mgr_add() argument
2385 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2446 struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport, in fc_exch_mgr_alloc() argument
2459 FC_LPORT_DBG(lport, "Invalid min_xid 0x:%x and max_xid 0x:%x\n", in fc_exch_mgr_alloc()
2472 mp->lport = lport; in fc_exch_mgr_alloc()
2516 if (!fc_exch_mgr_add(lport, mp, match)) { in fc_exch_mgr_alloc()
2541 void fc_exch_mgr_free(struct fc_lport *lport) in fc_exch_mgr_free() argument
2546 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2559 struct fc_lport *lport, in fc_find_ema() argument
2570 return list_entry(lport->ema_list.prev, in fc_find_ema()
2574 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2586 void fc_exch_recv(struct fc_lport *lport, struct fc_frame *fp) in fc_exch_recv() argument
2593 if (!lport || lport->state == LPORT_ST_DISABLED) { in fc_exch_recv()
2601 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2603 FC_LPORT_DBG(lport, "Unable to find Exchange Manager Anchor," in fc_exch_recv()
2630 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()
2633 FC_LPORT_DBG(lport, "dropping invalid frame (eof %x)", in fc_exch_recv()
2644 int fc_exch_init(struct fc_lport *lport) in fc_exch_init() argument
2646 if (!lport->tt.exch_mgr_reset) in fc_exch_init()
2647 lport->tt.exch_mgr_reset = fc_exch_mgr_reset; in fc_exch_init()