Lines Matching refs:ema
917 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
920 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
921 if (!ema->match || ema->match(fp)) { in fc_exch_alloc()
922 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1485 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1491 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1492 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1493 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1977 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1980 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1983 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
1998 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
2000 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2001 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
2002 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2360 struct fc_exch_mgr_anchor *ema; in fc_exch_update_stats() local
2365 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2366 mp = ema->mp; in fc_exch_update_stats()
2388 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2390 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2391 if (!ema) in fc_exch_mgr_add()
2392 return ema; in fc_exch_mgr_add()
2394 ema->mp = mp; in fc_exch_mgr_add()
2395 ema->match = match; in fc_exch_mgr_add()
2397 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2399 return ema; in fc_exch_mgr_add()
2420 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2423 list_del(&ema->ema_list); in fc_exch_mgr_del()
2424 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2425 kfree(ema); in fc_exch_mgr_del()
2436 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2438 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2439 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2444 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2445 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2555 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2558 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2559 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2574 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2583 typeof(*ema), ema_list); in fc_find_ema()
2586 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2587 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2588 (xid <= ema->mp->max_xid)) in fc_find_ema()
2589 return ema; in fc_find_ema()
2601 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2613 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2614 if (!ema) { in fc_exch_recv()
2635 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2638 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2640 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2642 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()