Lines Matching refs:ema
910 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
913 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
914 if (!ema->match || ema->match(fp)) { in fc_exch_alloc()
915 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1478 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1484 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1485 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1486 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1983 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1986 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1989 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
2004 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
2006 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
2007 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
2008 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2366 struct fc_exch_mgr_anchor *ema; in fc_exch_update_stats() local
2371 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2372 mp = ema->mp; in fc_exch_update_stats()
2394 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2396 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2397 if (!ema) in fc_exch_mgr_add()
2398 return ema; in fc_exch_mgr_add()
2400 ema->mp = mp; in fc_exch_mgr_add()
2401 ema->match = match; in fc_exch_mgr_add()
2403 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2405 return ema; in fc_exch_mgr_add()
2426 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2429 list_del(&ema->ema_list); in fc_exch_mgr_del()
2430 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2431 kfree(ema); in fc_exch_mgr_del()
2442 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2444 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2445 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2450 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2451 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2561 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2564 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2565 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2580 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2589 typeof(*ema), ema_list); in fc_find_ema()
2592 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2593 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2594 (xid <= ema->mp->max_xid)) in fc_find_ema()
2595 return ema; in fc_find_ema()
2607 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2619 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2620 if (!ema) { in fc_exch_recv()
2641 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2644 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2646 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2648 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()