Lines Matching refs:pd

409 	struct mthca_pd *pd;
412 pd = kmalloc(sizeof *pd, GFP_KERNEL);
413 if (!pd)
416 err = mthca_pd_alloc(to_mdev(ibdev), !context, pd);
418 kfree(pd);
423 if (ib_copy_to_udata(udata, &pd->pd_num, sizeof (__u32))) {
424 mthca_pd_free(to_mdev(ibdev), pd);
425 kfree(pd);
430 return &pd->ibpd;
433 static int mthca_dealloc_pd(struct ib_pd *pd)
435 mthca_pd_free(to_mdev(pd->device), to_mpd(pd));
436 kfree(pd);
441 static struct ib_ah *mthca_ah_create(struct ib_pd *pd,
451 err = mthca_create_ah(to_mdev(pd->device), to_mpd(pd), ah_attr, ah);
468 static struct ib_srq *mthca_create_srq(struct ib_pd *pd,
481 if (pd->uobject) {
482 context = to_mucontext(pd->uobject->context);
489 err = mthca_map_user_db(to_mdev(pd->device), &context->uar,
500 err = mthca_alloc_srq(to_mdev(pd->device), to_mpd(pd),
503 if (err && pd->uobject)
504 mthca_unmap_user_db(to_mdev(pd->device), &context->uar,
511 mthca_free_srq(to_mdev(pd->device), srq);
541 static struct ib_qp *mthca_create_qp(struct ib_pd *pd,
563 if (pd->uobject) {
564 context = to_mucontext(pd->uobject->context);
571 err = mthca_map_user_db(to_mdev(pd->device), &context->uar,
579 err = mthca_map_user_db(to_mdev(pd->device), &context->uar,
583 mthca_unmap_user_db(to_mdev(pd->device),
596 err = mthca_alloc_qp(to_mdev(pd->device), to_mpd(pd),
602 if (err && pd->uobject) {
603 context = to_mucontext(pd->uobject->context);
605 mthca_unmap_user_db(to_mdev(pd->device),
609 mthca_unmap_user_db(to_mdev(pd->device),
622 if (pd->uobject)
631 err = mthca_alloc_sqp(to_mdev(pd->device), to_mpd(pd),
903 static struct ib_mr *mthca_get_dma_mr(struct ib_pd *pd, int acc)
912 err = mthca_mr_alloc_notrans(to_mdev(pd->device),
913 to_mpd(pd)->pd_num,
926 static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd,
984 mthca_dbg(to_mdev(pd->device), "Registering memory at %llx (iova %llx) "
988 to_mpd(pd)->pd_num,
991 err = mthca_mr_alloc_phys(to_mdev(pd->device),
992 to_mpd(pd)->pd_num,
1009 static struct ib_mr *mthca_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
1012 struct mthca_dev *dev = to_mdev(pd->device);
1023 if (!to_mucontext(pd->uobject->context)->reg_mr_warned) {
1028 ++to_mucontext(pd->uobject->context)->reg_mr_warned;
1037 mr->umem = ib_umem_get(pd->uobject->context, start, length, acc,
1094 err = mthca_mr_alloc(dev, to_mpd(pd)->pd_num, shift, virt, length,
1125 static struct ib_fmr *mthca_alloc_fmr(struct ib_pd *pd, int mr_access_flags,
1136 err = mthca_fmr_alloc(to_mdev(pd->device), to_mpd(pd)->pd_num,