Lines Matching refs:nespd

59 	struct nes_pd *nespd = to_nespd(ibpd);  in nes_alloc_mw()  local
118 …set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_STAG_WQE_LEN_HIGH_PD_IDX, (nespd->pd_id & 0x00007f… in nes_alloc_mw()
282 static int alloc_fast_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd, in alloc_fast_reg_mr() argument
336 cpu_to_le32(nespd->pd_id & 0x00007fff); in alloc_fast_reg_mr()
379 struct nes_pd *nespd = to_nespd(ibpd); in nes_alloc_fast_reg_mr() local
424 ret = alloc_fast_reg_mr(nesdev, nespd, stag, max_page_list_len); in nes_alloc_fast_reg_mr()
779 struct nes_pd *nespd; in nes_alloc_pd() local
798 nespd = kzalloc(sizeof (struct nes_pd), GFP_KERNEL); in nes_alloc_pd()
799 if (!nespd) { in nes_alloc_pd()
805 nespd, nesvnic->nesibdev->ibdev.name); in nes_alloc_pd()
807 nespd->pd_id = (pd_num << (PAGE_SHIFT-12)) + nesadapter->base_pd; in nes_alloc_pd()
811 nespd->mmap_db_index = find_next_zero_bit(nesucontext->allocated_doorbells, in nes_alloc_pd()
814 nespd->mmap_db_index, nespd->pd_id); in nes_alloc_pd()
815 if (nespd->mmap_db_index >= NES_MAX_USER_DB_REGIONS) { in nes_alloc_pd()
818 kfree(nespd); in nes_alloc_pd()
822 uresp.pd_id = nespd->pd_id; in nes_alloc_pd()
823 uresp.mmap_db_index = nespd->mmap_db_index; in nes_alloc_pd()
826 kfree(nespd); in nes_alloc_pd()
830 set_bit(nespd->mmap_db_index, nesucontext->allocated_doorbells); in nes_alloc_pd()
831 nesucontext->mmap_db_index[nespd->mmap_db_index] = nespd->pd_id; in nes_alloc_pd()
832 nesucontext->first_free_db = nespd->mmap_db_index + 1; in nes_alloc_pd()
835 nes_debug(NES_DBG_PD, "PD%u structure located @%p.\n", nespd->pd_id, nespd); in nes_alloc_pd()
836 return &nespd->ibpd; in nes_alloc_pd()
846 struct nes_pd *nespd = to_nespd(ibpd); in nes_dealloc_pd() local
854 nespd->mmap_db_index); in nes_dealloc_pd()
855 clear_bit(nespd->mmap_db_index, nesucontext->allocated_doorbells); in nes_dealloc_pd()
856 nesucontext->mmap_db_index[nespd->mmap_db_index] = 0; in nes_dealloc_pd()
857 if (nesucontext->first_free_db > nespd->mmap_db_index) { in nes_dealloc_pd()
858 nesucontext->first_free_db = nespd->mmap_db_index; in nes_dealloc_pd()
863 nespd->pd_id, nespd); in nes_dealloc_pd()
865 (nespd->pd_id-nesadapter->base_pd)>>(PAGE_SHIFT-12)); in nes_dealloc_pd()
866 kfree(nespd); in nes_dealloc_pd()
1115 struct nes_pd *nespd = to_nespd(ibpd); in nes_create_qp() local
1271 nesqp->nespd = nespd; in nes_create_qp()
1322 nesqp->nesqp_context->pd_index_wscale |= cpu_to_le32((u32)nesqp->nespd->pd_id << 16); in nes_create_qp()
1929 static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd, in nes_reg_mr() argument
2043 cpu_to_le32(nespd->pd_id & 0x00007fff); in nes_reg_mr()
2101 struct nes_pd *nespd = to_nespd(ib_pd); in nes_reg_phys_mr() local
2250 ret = nes_reg_mr(nesdev, nespd, stag, region_length, &root_vpbl, in nes_reg_phys_mr()
2310 struct nes_pd *nespd = to_nespd(pd); in nes_reg_user_mr() local
2533 ret = nes_reg_mr(nesdev, nespd, stag, region->length, &root_vpbl, in nes_reg_user_mr()