Lines Matching refs:umrc

174 	dev->umrc.qp = qp;  in mlx5r_umr_resource_init()
175 dev->umrc.cq = cq; in mlx5r_umr_resource_init()
176 dev->umrc.pd = pd; in mlx5r_umr_resource_init()
178 sema_init(&dev->umrc.sem, MAX_UMR_WR); in mlx5r_umr_resource_init()
179 mutex_init(&dev->umrc.lock); in mlx5r_umr_resource_init()
180 dev->umrc.state = MLX5_UMR_STATE_ACTIVE; in mlx5r_umr_resource_init()
195 if (dev->umrc.state == MLX5_UMR_STATE_UNINIT) in mlx5r_umr_resource_cleanup()
197 ib_destroy_qp(dev->umrc.qp); in mlx5r_umr_resource_cleanup()
198 ib_free_cq(dev->umrc.cq); in mlx5r_umr_resource_cleanup()
199 ib_dealloc_pd(dev->umrc.pd); in mlx5r_umr_resource_cleanup()
204 struct umr_common *umrc = &dev->umrc; in mlx5r_umr_recover() local
209 err = ib_modify_qp(umrc->qp, &attr, IB_QP_STATE); in mlx5r_umr_recover()
215 err = mlx5r_umr_qp_rst2rts(dev, umrc->qp); in mlx5r_umr_recover()
219 umrc->state = MLX5_UMR_STATE_ACTIVE; in mlx5r_umr_recover()
223 umrc->state = MLX5_UMR_STATE_ERR; in mlx5r_umr_recover()
291 struct umr_common *umrc = &dev->umrc; in mlx5r_umr_post_send_wait() local
301 down(&umrc->sem); in mlx5r_umr_post_send_wait()
303 mutex_lock(&umrc->lock); in mlx5r_umr_post_send_wait()
304 if (umrc->state == MLX5_UMR_STATE_ERR) { in mlx5r_umr_post_send_wait()
305 mutex_unlock(&umrc->lock); in mlx5r_umr_post_send_wait()
310 if (umrc->state == MLX5_UMR_STATE_RECOVER) { in mlx5r_umr_post_send_wait()
311 mutex_unlock(&umrc->lock); in mlx5r_umr_post_send_wait()
316 err = mlx5r_umr_post_send(umrc->qp, mkey, &umr_context.cqe, wqe, in mlx5r_umr_post_send_wait()
318 mutex_unlock(&umrc->lock); in mlx5r_umr_post_send_wait()
337 mutex_lock(&umrc->lock); in mlx5r_umr_post_send_wait()
339 mutex_unlock(&umrc->lock); in mlx5r_umr_post_send_wait()
346 up(&umrc->sem); in mlx5r_umr_post_send_wait()
371 MLX5_SET(mkc, &wqe.mkey_seg, pd, to_mpd(dev->umrc.pd)->pdn); in mlx5r_umr_revoke_mr()
521 sg->lkey = dev->umrc.pd->local_dma_lkey; in mlx5r_umr_create_xlt()