Lines Matching refs:ema
802 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
804 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_alloc()
805 if (!ema->match || ema->match(fp)) in fc_exch_alloc()
806 return fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1326 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1332 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1333 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1334 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1817 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1820 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1823 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
1838 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
1840 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
1841 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
1842 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2168 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2170 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2171 if (!ema) in fc_exch_mgr_add()
2172 return ema; in fc_exch_mgr_add()
2174 ema->mp = mp; in fc_exch_mgr_add()
2175 ema->match = match; in fc_exch_mgr_add()
2177 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2179 return ema; in fc_exch_mgr_add()
2200 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2203 list_del(&ema->ema_list); in fc_exch_mgr_del()
2204 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2205 kfree(ema); in fc_exch_mgr_del()
2216 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2218 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2219 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2224 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2225 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2334 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2337 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2338 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2353 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2362 typeof(*ema), ema_list); in fc_find_ema()
2365 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2366 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2367 (xid <= ema->mp->max_xid)) in fc_find_ema()
2368 return ema; in fc_find_ema()
2380 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2392 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2393 if (!ema) { in fc_exch_recv()
2414 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2417 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2419 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2421 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()