Lines Matching refs:mmr

68 			    ~0ull, convert_access(acc), 0, 0, &mr->mmr);  in mlx4_ib_get_dma_mr()
72 err = mlx4_mr_enable(to_mdev(pd->device)->dev, &mr->mmr); in mlx4_ib_get_dma_mr()
76 mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key; in mlx4_ib_get_dma_mr()
82 (void) mlx4_mr_free(to_mdev(pd->device)->dev, &mr->mmr); in mlx4_ib_get_dma_mr()
429 convert_access(access_flags), n, shift, &mr->mmr); in mlx4_ib_reg_user_mr()
433 err = mlx4_ib_umem_write_mtt(dev, &mr->mmr.mtt, mr->umem); in mlx4_ib_reg_user_mr()
437 err = mlx4_mr_enable(dev->dev, &mr->mmr); in mlx4_ib_reg_user_mr()
441 mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key; in mlx4_ib_reg_user_mr()
447 (void) mlx4_mr_free(to_mdev(pd->device)->dev, &mr->mmr); in mlx4_ib_reg_user_mr()
464 struct mlx4_ib_mr *mmr = to_mmr(mr); in mlx4_ib_rereg_user_mr() local
473 err = mlx4_mr_hw_get_mpt(dev->dev, &mmr->mmr, &pmpt_entry); in mlx4_ib_rereg_user_mr()
487 !mmr->umem->writable) { in mlx4_ib_rereg_user_mr()
503 mlx4_mr_rereg_mem_cleanup(dev->dev, &mmr->mmr); in mlx4_ib_rereg_user_mr()
504 ib_umem_release(mmr->umem); in mlx4_ib_rereg_user_mr()
505 mmr->umem = mlx4_get_umem_mr(mr->device, start, length, in mlx4_ib_rereg_user_mr()
507 if (IS_ERR(mmr->umem)) { in mlx4_ib_rereg_user_mr()
508 err = PTR_ERR(mmr->umem); in mlx4_ib_rereg_user_mr()
510 mmr->umem = NULL; in mlx4_ib_rereg_user_mr()
513 n = ib_umem_num_dma_blocks(mmr->umem, PAGE_SIZE); in mlx4_ib_rereg_user_mr()
516 err = mlx4_mr_rereg_mem_write(dev->dev, &mmr->mmr, in mlx4_ib_rereg_user_mr()
520 ib_umem_release(mmr->umem); in mlx4_ib_rereg_user_mr()
523 mmr->mmr.iova = virt_addr; in mlx4_ib_rereg_user_mr()
524 mmr->mmr.size = length; in mlx4_ib_rereg_user_mr()
526 err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); in mlx4_ib_rereg_user_mr()
528 mlx4_mr_rereg_mem_cleanup(dev->dev, &mmr->mmr); in mlx4_ib_rereg_user_mr()
529 ib_umem_release(mmr->umem); in mlx4_ib_rereg_user_mr()
537 err = mlx4_mr_hw_write_mpt(dev->dev, &mmr->mmr, pmpt_entry); in mlx4_ib_rereg_user_mr()
539 mmr->mmr.access = mr_access_flags; in mlx4_ib_rereg_user_mr()
603 ret = mlx4_mr_free(to_mdev(ibmr->device)->dev, &mr->mmr); in mlx4_ib_dereg_mr()
660 max_num_sg, 0, &mr->mmr); in mlx4_ib_alloc_mr()
669 err = mlx4_mr_enable(dev->dev, &mr->mmr); in mlx4_ib_alloc_mr()
673 mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key; in mlx4_ib_alloc_mr()
682 (void) mlx4_mr_free(dev->dev, &mr->mmr); in mlx4_ib_alloc_mr()