Lines Matching refs:ema
894 struct fc_exch_mgr_anchor *ema; in fc_exch_alloc() local
896 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_alloc()
897 if (!ema->match || ema->match(fp)) in fc_exch_alloc()
898 return fc_exch_em_alloc(lport, ema->mp); in fc_exch_alloc()
1430 struct fc_exch_mgr_anchor *ema; in fc_seq_assign() local
1436 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_seq_assign()
1437 if ((!ema->match || ema->match(fp)) && in fc_seq_assign()
1438 fc_seq_lookup_recip(lport, ema->mp, fp) == FC_RJT_NONE) in fc_seq_assign()
1911 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_reset() local
1914 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_mgr_reset()
1917 per_cpu_ptr(ema->mp->pool, cpu), in fc_exch_mgr_reset()
1932 struct fc_exch_mgr_anchor *ema; in fc_exch_lookup() local
1934 list_for_each_entry(ema, &lport->ema_list, ema_list) in fc_exch_lookup()
1935 if (ema->mp->min_xid <= xid && xid <= ema->mp->max_xid) in fc_exch_lookup()
1936 return fc_exch_find(ema->mp, xid); in fc_exch_lookup()
2257 struct fc_exch_mgr_anchor *ema; in fc_exch_update_stats() local
2262 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_exch_update_stats()
2263 mp = ema->mp; in fc_exch_update_stats()
2285 struct fc_exch_mgr_anchor *ema; in fc_exch_mgr_add() local
2287 ema = kmalloc(sizeof(*ema), GFP_ATOMIC); in fc_exch_mgr_add()
2288 if (!ema) in fc_exch_mgr_add()
2289 return ema; in fc_exch_mgr_add()
2291 ema->mp = mp; in fc_exch_mgr_add()
2292 ema->match = match; in fc_exch_mgr_add()
2294 list_add_tail(&ema->ema_list, &lport->ema_list); in fc_exch_mgr_add()
2296 return ema; in fc_exch_mgr_add()
2317 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema) in fc_exch_mgr_del() argument
2320 list_del(&ema->ema_list); in fc_exch_mgr_del()
2321 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del()
2322 kfree(ema); in fc_exch_mgr_del()
2333 struct fc_exch_mgr_anchor *ema, *tmp; in fc_exch_mgr_list_clone() local
2335 list_for_each_entry(ema, &src->ema_list, ema_list) { in fc_exch_mgr_list_clone()
2336 if (!fc_exch_mgr_add(dst, ema->mp, ema->match)) in fc_exch_mgr_list_clone()
2341 list_for_each_entry_safe(ema, tmp, &dst->ema_list, ema_list) in fc_exch_mgr_list_clone()
2342 fc_exch_mgr_del(ema); in fc_exch_mgr_list_clone()
2451 struct fc_exch_mgr_anchor *ema, *next; in fc_exch_mgr_free() local
2454 list_for_each_entry_safe(ema, next, &lport->ema_list, ema_list) in fc_exch_mgr_free()
2455 fc_exch_mgr_del(ema); in fc_exch_mgr_free()
2470 struct fc_exch_mgr_anchor *ema; in fc_find_ema() local
2479 typeof(*ema), ema_list); in fc_find_ema()
2482 list_for_each_entry(ema, &lport->ema_list, ema_list) { in fc_find_ema()
2483 if ((xid >= ema->mp->min_xid) && in fc_find_ema()
2484 (xid <= ema->mp->max_xid)) in fc_find_ema()
2485 return ema; in fc_find_ema()
2497 struct fc_exch_mgr_anchor *ema; in fc_exch_recv() local
2509 ema = fc_find_ema(f_ctl, lport, fh); in fc_exch_recv()
2510 if (!ema) { in fc_exch_recv()
2531 fc_exch_recv_bls(ema->mp, fp); in fc_exch_recv()
2534 fc_exch_recv_seq_resp(ema->mp, fp); in fc_exch_recv()
2536 fc_exch_recv_resp(ema->mp, fp); in fc_exch_recv()
2538 fc_exch_recv_req(lport, ema->mp, fp); in fc_exch_recv()