Lines Matching refs:pd
39 int mthca_pd_alloc(struct mthca_dev *dev, int privileged, struct mthca_pd *pd) in mthca_pd_alloc() argument
43 pd->privileged = privileged; in mthca_pd_alloc()
45 atomic_set(&pd->sqp_count, 0); in mthca_pd_alloc()
46 pd->pd_num = mthca_alloc(&dev->pd_table.alloc); in mthca_pd_alloc()
47 if (pd->pd_num == -1) in mthca_pd_alloc()
51 err = mthca_mr_alloc_notrans(dev, pd->pd_num, in mthca_pd_alloc()
54 &pd->ntmr); in mthca_pd_alloc()
56 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_alloc()
62 void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd) in mthca_pd_free() argument
64 if (pd->privileged) in mthca_pd_free()
65 mthca_free_mr(dev, &pd->ntmr); in mthca_pd_free()
66 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_free()