Lines Matching refs:ema
783 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
785 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_alloc()
786 if (!ema->match || ema->match(fp)) in fc_exch_alloc()
787 return fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1287 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1293 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1294 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1295 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1772 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1775 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1778 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
1793 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
1795 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
1796 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
1797 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2118 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2120 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2121 if (!ema) in fc_exch_mgr_add()
2122 return ema; in fc_exch_mgr_add()
2124 ema->mp = mp; in fc_exch_mgr_add()
2125 ema->match = match; in fc_exch_mgr_add()
2127 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2129 return ema; in fc_exch_mgr_add()
2150 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2153 list_del(&ema->ema_list); in fc_exch_mgr_del()
2154 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2155 kfree(ema); in fc_exch_mgr_del()
2166 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2168 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2169 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2174 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2175 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2273 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2276 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2277 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2292 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2301 typeof(*ema), ema_list); in fc_find_ema()
2304 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2305 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2306 (xid <= ema->mp->max_xid)) in fc_find_ema()
2307 return ema; in fc_find_ema()
2319 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2331 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2332 if (!ema) { in fc_exch_recv()
2353 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2356 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2358 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2360 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()