Lines Matching refs:nespd
60 struct nes_pd *nespd = to_nespd(ibpd); in nes_alloc_mw() local
122 …set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_LEN_HIGH_PD_IDX, (nespd->pd_id & 0x00007f… in nes_alloc_mw()
285 static int alloc_fast_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd, in alloc_fast_reg_mr() argument
339 cpu_to_le32(nespd->pd_id & 0x00007fff); in alloc_fast_reg_mr()
382 struct nes_pd *nespd = to_nespd(ibpd); in nes_alloc_fast_reg_mr() local
427 ret = alloc_fast_reg_mr(nesdev, nespd, stag, max_page_list_len); in nes_alloc_fast_reg_mr()
772 struct nes_pd *nespd; in nes_alloc_pd() local
791 nespd = kzalloc(sizeof (struct nes_pd), GFP_KERNEL); in nes_alloc_pd()
792 if (!nespd) { in nes_alloc_pd()
798 nespd, nesvnic->nesibdev->ibdev.name); in nes_alloc_pd()
800 nespd->pd_id = (pd_num << (PAGE_SHIFT-12)) + nesadapter->base_pd; in nes_alloc_pd()
804 nespd->mmap_db_index = find_next_zero_bit(nesucontext->allocated_doorbells, in nes_alloc_pd()
807 nespd->mmap_db_index, nespd->pd_id); in nes_alloc_pd()
808 if (nespd->mmap_db_index >= NES_MAX_USER_DB_REGIONS) { in nes_alloc_pd()
811 kfree(nespd); in nes_alloc_pd()
815 uresp.pd_id = nespd->pd_id; in nes_alloc_pd()
816 uresp.mmap_db_index = nespd->mmap_db_index; in nes_alloc_pd()
819 kfree(nespd); in nes_alloc_pd()
823 set_bit(nespd->mmap_db_index, nesucontext->allocated_doorbells); in nes_alloc_pd()
824 nesucontext->mmap_db_index[nespd->mmap_db_index] = nespd->pd_id; in nes_alloc_pd()
825 nesucontext->first_free_db = nespd->mmap_db_index + 1; in nes_alloc_pd()
828 nes_debug(NES_DBG_PD, "PD%u structure located @%p.\n", nespd->pd_id, nespd); in nes_alloc_pd()
829 return &nespd->ibpd; in nes_alloc_pd()
839 struct nes_pd *nespd = to_nespd(ibpd); in nes_dealloc_pd() local
847 nespd->mmap_db_index); in nes_dealloc_pd()
848 clear_bit(nespd->mmap_db_index, nesucontext->allocated_doorbells); in nes_dealloc_pd()
849 nesucontext->mmap_db_index[nespd->mmap_db_index] = 0; in nes_dealloc_pd()
850 if (nesucontext->first_free_db > nespd->mmap_db_index) { in nes_dealloc_pd()
851 nesucontext->first_free_db = nespd->mmap_db_index; in nes_dealloc_pd()
856 nespd->pd_id, nespd); in nes_dealloc_pd()
858 (nespd->pd_id-nesadapter->base_pd)>>(PAGE_SHIFT-12)); in nes_dealloc_pd()
859 kfree(nespd); in nes_dealloc_pd()
1108 struct nes_pd *nespd = to_nespd(ibpd); in nes_create_qp() local
1266 nesqp->nespd = nespd; in nes_create_qp()
1317 nesqp->nesqp_context->pd_index_wscale |= cpu_to_le32((u32)nesqp->nespd->pd_id << 16); in nes_create_qp()
1925 static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd, in nes_reg_mr() argument
2039 cpu_to_le32(nespd->pd_id & 0x00007fff); in nes_reg_mr()
2097 struct nes_pd *nespd = to_nespd(ib_pd); in nes_reg_phys_mr() local
2246 ret = nes_reg_mr(nesdev, nespd, stag, region_length, &root_vpbl, in nes_reg_phys_mr()
2306 struct nes_pd *nespd = to_nespd(pd); in nes_reg_user_mr() local
2529 ret = nes_reg_mr(nesdev, nespd, stag, region->length, &root_vpbl, in nes_reg_user_mr()