Lines Matching refs:ema
905 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
908 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_alloc()
909 if (!ema->match || ema->match(fp)) { in fc_exch_alloc()
910 ep = fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1473 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1479 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1480 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1481 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1965 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1968 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1971 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
1986 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
1988 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
1989 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
1990 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2348 struct fc_exch_mgr_anchor *ema; in fc_exch_update_stats() local
2353 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2354 mp = ema->mp; in fc_exch_update_stats()
2376 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2378 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2379 if (!ema) in fc_exch_mgr_add()
2380 return ema; in fc_exch_mgr_add()
2382 ema->mp = mp; in fc_exch_mgr_add()
2383 ema->match = match; in fc_exch_mgr_add()
2385 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2387 return ema; in fc_exch_mgr_add()
2408 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2411 list_del(&ema->ema_list); in fc_exch_mgr_del()
2412 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2413 kfree(ema); in fc_exch_mgr_del()
2424 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2426 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2427 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2432 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2433 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2543 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2546 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2547 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2562 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2571 typeof(*ema), ema_list); in fc_find_ema()
2574 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2575 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2576 (xid <= ema->mp->max_xid)) in fc_find_ema()
2577 return ema; in fc_find_ema()
2589 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2601 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2602 if (!ema) { in fc_exch_recv()
2623 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2626 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2628 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2630 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()