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