Lines Matching refs:ibdev

53 static int mthca_query_device(struct ib_device *ibdev, struct ib_device_attr *props,  in mthca_query_device()  argument
59 struct mthca_dev *mdev = to_mdev(ibdev); in mthca_query_device()
121 static int mthca_query_port(struct ib_device *ibdev, in mthca_query_port() argument
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()
170 static int mthca_modify_device(struct ib_device *ibdev, in mthca_modify_device() argument
178 if (mutex_lock_interruptible(&to_mdev(ibdev)->cap_mask_mutex)) in mthca_modify_device()
180 memcpy(ibdev->node_desc, props->node_desc, in mthca_modify_device()
182 mutex_unlock(&to_mdev(ibdev)->cap_mask_mutex); in mthca_modify_device()
188 static int mthca_modify_port(struct ib_device *ibdev, in mthca_modify_port() argument
196 if (mutex_lock_interruptible(&to_mdev(ibdev)->cap_mask_mutex)) in mthca_modify_port()
199 err = ib_query_port(ibdev, port, &attr); 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()
217 static int mthca_query_pkey(struct ib_device *ibdev, in mthca_query_pkey() argument
233 err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, in mthca_query_pkey()
246 static int mthca_query_gid(struct ib_device *ibdev, u32 port, in mthca_query_gid() argument
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()
289 struct ib_device *ibdev = uctx->device; in mthca_alloc_ucontext() local
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()
350 struct ib_device *ibdev = ibpd->device; in mthca_alloc_pd() local
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()
579 struct ib_device *ibdev = ibcq->device; in mthca_create_cq() local
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()
1028 static int mthca_port_immutable(struct ib_device *ibdev, u32 port_num, in mthca_port_immutable() argument
1036 err = ib_query_port(ibdev, port_num, &attr); in mthca_port_immutable()