Lines Matching refs:ema
909 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
912 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
913 if (!ema->match || ema->match(fp)) { in fc_exch_alloc()
914 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1477 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1483 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1484 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1485 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1981 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1984 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1987 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
2002 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
2004 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2005 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
2006 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2364 struct fc_exch_mgr_anchor *ema; in fc_exch_update_stats() local
2369 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2370 mp = ema->mp; in fc_exch_update_stats()
2392 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2394 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2395 if (!ema) in fc_exch_mgr_add()
2396 return ema; in fc_exch_mgr_add()
2398 ema->mp = mp; in fc_exch_mgr_add()
2399 ema->match = match; in fc_exch_mgr_add()
2401 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2403 return ema; in fc_exch_mgr_add()
2424 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2427 list_del(&ema->ema_list); in fc_exch_mgr_del()
2428 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2429 kfree(ema); in fc_exch_mgr_del()
2440 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2442 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2443 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2448 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2449 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2559 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2562 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2563 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2578 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2587 typeof(*ema), ema_list); in fc_find_ema()
2590 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2591 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2592 (xid <= ema->mp->max_xid)) in fc_find_ema()
2593 return ema; in fc_find_ema()
2605 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2617 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2618 if (!ema) { in fc_exch_recv()
2639 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2642 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2644 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2646 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()