Lines Matching refs:vcxn_mngr

354 static void idpf_vc_xn_init(struct idpf_vc_xn_manager *vcxn_mngr)  in idpf_vc_xn_init()  argument
358 spin_lock_init(&vcxn_mngr->xn_bm_lock); in idpf_vc_xn_init()
360 for (i = 0; i < ARRAY_SIZE(vcxn_mngr->ring); i++) { in idpf_vc_xn_init()
361 struct idpf_vc_xn *xn = &vcxn_mngr->ring[i]; in idpf_vc_xn_init()
369 bitmap_fill(vcxn_mngr->free_xn_bm, IDPF_VC_XN_RING_LEN); in idpf_vc_xn_init()
379 static void idpf_vc_xn_shutdown(struct idpf_vc_xn_manager *vcxn_mngr) in idpf_vc_xn_shutdown() argument
383 spin_lock_bh(&vcxn_mngr->xn_bm_lock); in idpf_vc_xn_shutdown()
384 bitmap_zero(vcxn_mngr->free_xn_bm, IDPF_VC_XN_RING_LEN); in idpf_vc_xn_shutdown()
385 spin_unlock_bh(&vcxn_mngr->xn_bm_lock); in idpf_vc_xn_shutdown()
387 for (i = 0; i < ARRAY_SIZE(vcxn_mngr->ring); i++) { in idpf_vc_xn_shutdown()
388 struct idpf_vc_xn *xn = &vcxn_mngr->ring[i]; in idpf_vc_xn_shutdown()
405 struct idpf_vc_xn *idpf_vc_xn_pop_free(struct idpf_vc_xn_manager *vcxn_mngr) in idpf_vc_xn_pop_free() argument
410 spin_lock_bh(&vcxn_mngr->xn_bm_lock); in idpf_vc_xn_pop_free()
411 free_idx = find_first_bit(vcxn_mngr->free_xn_bm, IDPF_VC_XN_RING_LEN); in idpf_vc_xn_pop_free()
415 clear_bit(free_idx, vcxn_mngr->free_xn_bm); in idpf_vc_xn_pop_free()
416 xn = &vcxn_mngr->ring[free_idx]; in idpf_vc_xn_pop_free()
417 xn->salt = vcxn_mngr->salt++; in idpf_vc_xn_pop_free()
420 spin_unlock_bh(&vcxn_mngr->xn_bm_lock); in idpf_vc_xn_pop_free()
430 static void idpf_vc_xn_push_free(struct idpf_vc_xn_manager *vcxn_mngr, in idpf_vc_xn_push_free() argument
434 set_bit(xn->idx, vcxn_mngr->free_xn_bm); in idpf_vc_xn_push_free()
460 xn = idpf_vc_xn_pop_free(adapter->vcxn_mngr); in idpf_vc_xn_exec()
540 idpf_vc_xn_push_free(adapter->vcxn_mngr, xn); in idpf_vc_xn_exec()
585 idpf_vc_xn_push_free(adapter->vcxn_mngr, xn); in idpf_vc_xn_forward_async()
609 if (xn_idx >= ARRAY_SIZE(adapter->vcxn_mngr->ring)) { in idpf_vc_xn_forward_reply()
614 xn = &adapter->vcxn_mngr->ring[xn_idx]; in idpf_vc_xn_forward_reply()
2942 if (!adapter->vcxn_mngr) { in idpf_vc_core_init()
2943 adapter->vcxn_mngr = kzalloc(sizeof(*adapter->vcxn_mngr), GFP_KERNEL); in idpf_vc_core_init()
2944 if (!adapter->vcxn_mngr) { in idpf_vc_core_init()
2949 idpf_vc_xn_init(adapter->vcxn_mngr); in idpf_vc_core_init()
3064 if (adapter->vcxn_mngr) in idpf_vc_core_init()
3065 idpf_vc_xn_shutdown(adapter->vcxn_mngr); in idpf_vc_core_init()
3085 idpf_vc_xn_shutdown(adapter->vcxn_mngr); in idpf_vc_core_deinit()