Lines Matching refs:nesmr
64 struct nes_mr *nesmr; in nes_alloc_mw() local
88 nesmr = kzalloc(sizeof(*nesmr), GFP_KERNEL); in nes_alloc_mw()
89 if (!nesmr) { in nes_alloc_mw()
104 kfree(nesmr); in nes_alloc_mw()
132 kfree(nesmr); in nes_alloc_mw()
142 nesmr->ibmw.rkey = stag; in nes_alloc_mw()
143 nesmr->mode = IWNES_MEMREG_TYPE_MW; in nes_alloc_mw()
144 ibmw = &nesmr->ibmw; in nes_alloc_mw()
145 nesmr->pbl_4k = 0; in nes_alloc_mw()
146 nesmr->pbls_used = 0; in nes_alloc_mw()
157 struct nes_mr *nesmr = to_nesmw(ibmw); in nes_dealloc_mw() local
198 kfree(nesmr); in nes_dealloc_mw()
389 struct nes_mr *nesmr; in nes_alloc_fast_reg_mr() local
411 nesmr = kzalloc(sizeof(*nesmr), GFP_KERNEL); in nes_alloc_fast_reg_mr()
412 if (!nesmr) { in nes_alloc_fast_reg_mr()
427 nesmr->ibmr.rkey = stag; in nes_alloc_fast_reg_mr()
428 nesmr->ibmr.lkey = stag; in nes_alloc_fast_reg_mr()
429 nesmr->mode = IWNES_MEMREG_TYPE_FMEM; in nes_alloc_fast_reg_mr()
430 ibmr = &nesmr->ibmr; in nes_alloc_fast_reg_mr()
432 kfree(nesmr); in nes_alloc_fast_reg_mr()
2105 struct nes_mr *nesmr; in nes_reg_phys_mr() local
2148 nesmr = kzalloc(sizeof(*nesmr), GFP_KERNEL); in nes_reg_phys_mr()
2149 if (!nesmr) { in nes_reg_phys_mr()
2167 kfree(nesmr); in nes_reg_phys_mr()
2177 kfree(nesmr); in nes_reg_phys_mr()
2193 kfree(nesmr); in nes_reg_phys_mr()
2218 kfree(nesmr); in nes_reg_phys_mr()
2252 &nesmr->pbls_used, &nesmr->pbl_4k); in nes_reg_phys_mr()
2255 nesmr->ibmr.rkey = stag; in nes_reg_phys_mr()
2256 nesmr->ibmr.lkey = stag; in nes_reg_phys_mr()
2257 nesmr->mode = IWNES_MEMREG_TYPE_MEM; in nes_reg_phys_mr()
2258 ibmr = &nesmr->ibmr; in nes_reg_phys_mr()
2260 kfree(nesmr); in nes_reg_phys_mr()
2318 struct nes_mr *nesmr; in nes_reg_user_mr() local
2378 nesmr = kzalloc(sizeof(*nesmr), GFP_KERNEL); in nes_reg_user_mr()
2379 if (!nesmr) { in nes_reg_user_mr()
2384 nesmr->region = region; in nes_reg_user_mr()
2396 kfree(nesmr); in nes_reg_user_mr()
2406 kfree(nesmr); in nes_reg_user_mr()
2422 kfree(nesmr); in nes_reg_user_mr()
2437 kfree(nesmr); in nes_reg_user_mr()
2451 kfree(nesmr); in nes_reg_user_mr()
2469 kfree(nesmr); in nes_reg_user_mr()
2535 &iova_start, &nesmr->pbls_used, &nesmr->pbl_4k); in nes_reg_user_mr()
2540 nesmr->ibmr.rkey = stag; in nes_reg_user_mr()
2541 nesmr->ibmr.lkey = stag; in nes_reg_user_mr()
2542 nesmr->mode = IWNES_MEMREG_TYPE_MEM; in nes_reg_user_mr()
2543 ibmr = &nesmr->ibmr; in nes_reg_user_mr()
2546 kfree(nesmr); in nes_reg_user_mr()
2577 nesmr = kzalloc(sizeof(*nesmr), GFP_KERNEL); in nes_reg_user_mr()
2578 if (!nesmr) { in nes_reg_user_mr()
2584 nesmr->region = region; in nes_reg_user_mr()
2601 kfree(nesmr); in nes_reg_user_mr()
2638 nesmr->ibmr.rkey = -1; in nes_reg_user_mr()
2639 nesmr->ibmr.lkey = -1; in nes_reg_user_mr()
2640 nesmr->mode = req.reg_type; in nes_reg_user_mr()
2641 return &nesmr->ibmr; in nes_reg_user_mr()
2653 struct nes_mr *nesmr = to_nesmr(ib_mr); in nes_dereg_mr() local
2664 if (nesmr->region) { in nes_dereg_mr()
2665 ib_umem_release(nesmr->region); in nes_dereg_mr()
2667 if (nesmr->mode != IWNES_MEMREG_TYPE_MEM) { in nes_dereg_mr()
2668 kfree(nesmr); in nes_dereg_mr()
2716 if (nesmr->pbls_used != 0) { in nes_dereg_mr()
2718 if (nesmr->pbl_4k) { in nes_dereg_mr()
2719 nesadapter->free_4kpbl += nesmr->pbls_used; in nes_dereg_mr()
2726 nesadapter->free_256pbl += nesmr->pbls_used; in nes_dereg_mr()
2738 kfree(nesmr); in nes_dereg_mr()