Lines Matching refs:to_mdev

59 	struct mthca_dev *mdev = to_mdev(ibdev);  in mthca_query_device()
139 err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, in mthca_query_port()
151 props->gid_tbl_len = to_mdev(ibdev)->limits.gid_table_len; in mthca_query_port()
153 props->pkey_tbl_len = to_mdev(ibdev)->limits.pkey_table_len; in mthca_query_port()
178 if (mutex_lock_interruptible(&to_mdev(ibdev)->cap_mask_mutex)) in mthca_modify_device()
182 mutex_unlock(&to_mdev(ibdev)->cap_mask_mutex); in mthca_modify_device()
196 if (mutex_lock_interruptible(&to_mdev(ibdev)->cap_mask_mutex)) in mthca_modify_port()
209 err = mthca_SET_IB(to_mdev(ibdev), &set_ib, port); in mthca_modify_port()
213 mutex_unlock(&to_mdev(ibdev)->cap_mask_mutex); in mthca_modify_port()
233 err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, in mthca_query_pkey()
262 err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, in mthca_query_gid()
273 err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, in mthca_query_gid()
294 if (!(to_mdev(ibdev)->active)) in mthca_alloc_ucontext()
297 uresp.qp_tab_size = to_mdev(ibdev)->limits.num_qps; in mthca_alloc_ucontext()
298 if (mthca_is_memfree(to_mdev(ibdev))) in mthca_alloc_ucontext()
299 uresp.uarc_size = to_mdev(ibdev)->uar_table.uarc_size; in mthca_alloc_ucontext()
303 err = mthca_uar_alloc(to_mdev(ibdev), &context->uar); in mthca_alloc_ucontext()
307 context->db_tab = mthca_init_user_db_tab(to_mdev(ibdev)); in mthca_alloc_ucontext()
310 mthca_uar_free(to_mdev(ibdev), &context->uar); in mthca_alloc_ucontext()
315 mthca_cleanup_user_db_tab(to_mdev(ibdev), &context->uar, context->db_tab); in mthca_alloc_ucontext()
316 mthca_uar_free(to_mdev(ibdev), &context->uar); in mthca_alloc_ucontext()
327 mthca_cleanup_user_db_tab(to_mdev(context->device), &to_mucontext(context)->uar, in mthca_dealloc_ucontext()
329 mthca_uar_free(to_mdev(context->device), &to_mucontext(context)->uar); in mthca_dealloc_ucontext()
354 err = mthca_pd_alloc(to_mdev(ibdev), !udata, pd); in mthca_alloc_pd()
360 mthca_pd_free(to_mdev(ibdev), pd); in mthca_alloc_pd()
370 mthca_pd_free(to_mdev(pd->device), to_mpd(pd)); in mthca_dealloc_pd()
381 return mthca_create_ah(to_mdev(ibah->device), to_mpd(ibah->pd), in mthca_ah_create()
387 mthca_destroy_ah(to_mdev(ah->device), to_mah(ah)); in mthca_ah_destroy()
408 err = mthca_map_user_db(to_mdev(ibsrq->device), &context->uar, in mthca_create_srq()
419 err = mthca_alloc_srq(to_mdev(ibsrq->device), to_mpd(ibsrq->pd), in mthca_create_srq()
423 mthca_unmap_user_db(to_mdev(ibsrq->device), &context->uar, in mthca_create_srq()
430 mthca_free_srq(to_mdev(ibsrq->device), srq); in mthca_create_srq()
446 mthca_unmap_user_db(to_mdev(srq->device), &context->uar, in mthca_destroy_srq()
450 mthca_free_srq(to_mdev(srq->device), to_msrq(srq)); in mthca_destroy_srq()
462 struct mthca_dev *dev = to_mdev(ibqp->device); in mthca_create_qp()
561 mthca_unmap_user_db(to_mdev(qp->device), in mthca_destroy_qp()
565 mthca_unmap_user_db(to_mdev(qp->device), in mthca_destroy_qp()
570 mthca_free_qp(to_mdev(qp->device), to_mqp(qp)); in mthca_destroy_qp()
591 if (entries < 1 || entries > to_mdev(ibdev)->limits.max_cqes) in mthca_create_cq()
598 err = mthca_map_user_db(to_mdev(ibdev), &context->uar, in mthca_create_cq()
604 err = mthca_map_user_db(to_mdev(ibdev), &context->uar, in mthca_create_cq()
622 err = mthca_init_cq(to_mdev(ibdev), nent, context, in mthca_create_cq()
623 udata ? ucmd.pdn : to_mdev(ibdev)->driver_pd.pd_num, in mthca_create_cq()
629 mthca_free_cq(to_mdev(ibdev), cq); in mthca_create_cq()
640 mthca_unmap_user_db(to_mdev(ibdev), &context->uar, in mthca_create_cq()
645 mthca_unmap_user_db(to_mdev(ibdev), &context->uar, in mthca_create_cq()
698 struct mthca_dev *dev = to_mdev(ibcq->device); in mthca_resize_cq()
781 mthca_unmap_user_db(to_mdev(cq->device), in mthca_destroy_cq()
785 mthca_unmap_user_db(to_mdev(cq->device), in mthca_destroy_cq()
790 mthca_free_cq(to_mdev(cq->device), to_mcq(cq)); in mthca_destroy_cq()
812 err = mthca_mr_alloc_notrans(to_mdev(pd->device), in mthca_get_dma_mr()
829 struct mthca_dev *dev = to_mdev(pd->device); in mthca_reg_user_mr()
925 mthca_free_mr(to_mdev(mr->device), mmr); in mthca_dereg_mr()