Lines Matching refs:lport
86 struct fc_lport *lport; member
463 static int fc_seq_send_locked(struct fc_lport *lport, struct fc_seq *sp, in fc_seq_send_locked() argument
499 error = lport->tt.frame_send(lport, fp); in fc_seq_send_locked()
525 int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, struct fc_frame *fp) in fc_seq_send() argument
531 error = fc_seq_send_locked(lport, sp, fp); in fc_seq_send()
812 static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, in fc_exch_em_alloc() argument
879 ep->lp = lport; in fc_exch_em_alloc()
906 static struct fc_exch *fc_exch_alloc(struct fc_lport *lport, in fc_exch_alloc() argument
912 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
914 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
929 struct fc_lport *lport = mp->lport; in fc_exch_find() local
939 lport->host->host_no, lport->port_id, xid, cpu); in fc_exch_find()
948 FC_LPORT_DBG(lport, "xid %x quarantined\n", xid); in fc_exch_find()
991 static struct fc_exch *fc_exch_resp(struct fc_lport *lport, in fc_exch_resp() argument
998 ep = fc_exch_alloc(lport, fp); in fc_exch_resp()
1039 static enum fc_pf_rjt_reason fc_seq_lookup_recip(struct fc_lport *lport, in fc_seq_lookup_recip() argument
1094 ep = fc_exch_resp(lport, mp, fp); in fc_seq_lookup_recip()
1282 struct fc_lport *lport = ep->lp; in fc_seq_send_ack() local
1289 fp = fc_frame_alloc(lport, 0); in fc_seq_send_ack()
1326 lport->tt.frame_send(lport, fp); in fc_seq_send_ack()
1347 struct fc_lport *lport; in fc_exch_send_ba_rjt() local
1350 lport = fr_dev(rx_fp); in fc_exch_send_ba_rjt()
1352 fp = fc_frame_alloc(lport, sizeof(*rp)); in fc_exch_send_ba_rjt()
1400 lport->tt.frame_send(lport, fp); in fc_exch_send_ba_rjt()
1475 struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) in fc_seq_assign() argument
1479 WARN_ON(lport != fr_dev(fp)); in fc_seq_assign()
1483 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1485 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1510 static void fc_exch_recv_req(struct fc_lport *lport, struct fc_exch_mgr *mp, in fc_exch_recv_req() argument
1521 lport = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in fc_exch_recv_req()
1522 if (!lport) { in fc_exch_recv_req()
1526 fr_dev(fp) = lport; in fc_exch_recv_req()
1535 return fc_lport_recv(lport, fp); in fc_exch_recv_req()
1537 reject = fc_seq_lookup_recip(lport, mp, fp); in fc_exch_recv_req()
1556 fc_lport_recv(lport, fp); in fc_exch_recv_req()
1559 FC_LPORT_DBG(lport, "exch/seq lookup failed: reject %x\n", in fc_exch_recv_req()
1831 struct fc_lport *lport; in fc_seq_ls_acc() local
1836 lport = fr_dev(rx_fp); in fc_seq_ls_acc()
1838 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_seq_ls_acc()
1848 lport->tt.frame_send(lport, fp); in fc_seq_ls_acc()
1863 struct fc_lport *lport; in fc_seq_ls_rjt() local
1868 lport = fr_dev(rx_fp); in fc_seq_ls_rjt()
1870 fp = fc_frame_alloc(lport, sizeof(*rjt)); in fc_seq_ls_rjt()
1882 lport->tt.frame_send(lport, fp); in fc_seq_ls_rjt()
1934 static void fc_exch_pool_reset(struct fc_lport *lport, in fc_exch_pool_reset() argument
1944 if ((lport == ep->lp) && in fc_exch_pool_reset()
1979 void fc_exch_mgr_reset(struct fc_lport *lport, u32 sid, u32 did) in fc_exch_mgr_reset() argument
1984 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1986 fc_exch_pool_reset(lport, in fc_exch_mgr_reset()
2000 static struct fc_exch *fc_exch_lookup(struct fc_lport *lport, u32 xid) in fc_exch_lookup() argument
2004 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2018 struct fc_lport *lport; in fc_exch_els_rec() local
2028 lport = fr_dev(rfp); in fc_exch_els_rec()
2038 if (sid == fc_host_port_id(lport->host)) in fc_exch_els_rec()
2043 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2048 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rec()
2050 FC_LPORT_DBG(lport, in fc_exch_els_rec()
2061 fp = fc_frame_alloc(lport, sizeof(*acc)); in fc_exch_els_rec()
2082 lport->tt.frame_send(lport, fp); in fc_exch_els_rec()
2175 struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, in fc_exch_seq_send() argument
2189 ep = fc_exch_alloc(lport, fp); in fc_exch_seq_send()
2200 ep->r_a_tov = lport->r_a_tov; in fc_exch_seq_send()
2201 ep->lp = lport; in fc_exch_seq_send()
2209 if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD) { in fc_exch_seq_send()
2214 if (unlikely(lport->tt.frame_send(lport, fp))) in fc_exch_seq_send()
2245 struct fc_lport *lport; in fc_exch_rrq() local
2250 lport = ep->lp; in fc_exch_rrq()
2252 fp = fc_frame_alloc(lport, sizeof(*rrq)); in fc_exch_rrq()
2268 lport->port_id, FC_TYPE_ELS, in fc_exch_rrq()
2271 if (fc_exch_seq_send(lport, fp, fc_exch_rrq_resp, NULL, ep, in fc_exch_rrq()
2272 lport->e_d_tov)) in fc_exch_rrq()
2295 struct fc_lport *lport; in fc_exch_els_rrq() local
2302 lport = fr_dev(fp); in fc_exch_els_rrq()
2312 xid = fc_host_port_id(lport->host) == sid ? in fc_exch_els_rrq()
2314 ep = fc_exch_lookup(lport, xid); in fc_exch_els_rrq()
2361 void fc_exch_update_stats(struct fc_lport *lport) in fc_exch_update_stats() argument
2367 st = &lport->host_stats; in fc_exch_update_stats()
2369 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2388 struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport, in fc_exch_mgr_add() argument
2401 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2462 struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport, in fc_exch_mgr_alloc() argument
2475 FC_LPORT_DBG(lport, "Invalid min_xid 0x:%x and max_xid 0x:%x\n", in fc_exch_mgr_alloc()
2488 mp->lport = lport; in fc_exch_mgr_alloc()
2532 if (!fc_exch_mgr_add(lport, mp, match)) { in fc_exch_mgr_alloc()
2557 void fc_exch_mgr_free(struct fc_lport *lport) in fc_exch_mgr_free() argument
2562 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2575 struct fc_lport *lport, in fc_find_ema() argument
2586 return list_entry(lport->ema_list.prev, in fc_find_ema()
2590 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2602 void fc_exch_recv(struct fc_lport *lport, struct fc_frame *fp) in fc_exch_recv() argument
2609 if (!lport || lport->state == LPORT_ST_DISABLED) { in fc_exch_recv()
2617 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2619 FC_LPORT_DBG(lport, "Unable to find Exchange Manager Anchor," in fc_exch_recv()
2646 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()
2649 FC_LPORT_DBG(lport, "dropping invalid frame (eof %x)", in fc_exch_recv()
2660 int fc_exch_init(struct fc_lport *lport) in fc_exch_init() argument
2662 if (!lport->tt.exch_mgr_reset) in fc_exch_init()
2663 lport->tt.exch_mgr_reset = fc_exch_mgr_reset; in fc_exch_init()