Lines Matching refs:rhp
106 struct c4iw_dev *rhp = rdev_to_c4iw_dev(rdev); in destroy_qp() local
111 dma_free_coherent(rhp->ibdev.dma_device, in destroy_qp()
114 dma_free_coherent(rhp->ibdev.dma_device, in destroy_qp()
130 struct c4iw_dev *rhp = rdev_to_c4iw_dev(rdev); in create_qp() local
181 wq->sq.queue = dma_alloc_coherent(rhp->ibdev.dma_device, wq->sq.memsize, in create_qp()
191 wq->rq.queue = dma_alloc_coherent(rhp->ibdev.dma_device, in create_qp()
318 dma_free_coherent(rhp->ibdev.dma_device, in create_qp()
322 dma_free_coherent(rhp->ibdev.dma_device, in create_qp()
576 struct c4iw_dev *rhp; in free_qp_work() local
580 rhp = qhp->rhp; in free_qp_work()
584 destroy_qp(&rhp->rdev, &qhp->wq, in free_qp_work()
585 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in free_qp_work()
596 queue_work(qhp->rhp->rdev.free_workq, &qhp->free_work); in queue_qp_free()
692 PBL_OFF(&mhp->rhp->rdev, mhp->attr.pbl_addr)>>3)); in build_tpte_memreg()
716 if (mhp->mpl_len > t4_max_fr_depth(&mhp->rhp->rdev, use_dsgl)) in build_memreg()
790 rdev = &qhp->rhp->rdev; in c4iw_post_send()
842 c4iw_invalidate_mr(qhp->rhp, in c4iw_post_send()
881 c4iw_invalidate_mr(qhp->rhp, wr->ex.invalidate_rkey); in c4iw_post_send()
928 if (__predict_false(c4iw_stopped(&qhp->rhp->rdev))) in c4iw_post_receive()
977 t4_ring_rq_db(&qhp->wq, idx, wqe, qhp->rhp->rdev.adap->iwt.wc_en); in c4iw_post_receive()
1157 t4_wrq_tx(qhp->rhp->rdev.adap, wr); in post_terminate()
1248 rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, struct c4iw_ep *ep) in rdma_fini() argument
1250 struct c4iw_rdev *rdev = &rhp->rdev; in rdma_fini()
1260 KASSERT(rhp == qhp->rhp && ep == qhp->ep, ("%s: EDOOFUS", __func__)); in rdma_fini()
1343 static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) in rdma_init() argument
1349 struct c4iw_rdev *rdev = &qhp->rhp->rdev; in rdma_init()
1363 ret = alloc_ird(rhp, qhp->attr.max_ird); in rdma_init()
1420 free_ird(rhp, qhp->attr.max_ird); in rdma_init()
1429 free_ird(rhp, qhp->attr.max_ird); in rdma_init()
1434 int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, in c4iw_modify_qp() argument
1474 if (attrs->max_ird > cur_max_read_depth(rhp)) { in c4iw_modify_qp()
1528 ret = rdma_init(rhp, qhp); in c4iw_modify_qp()
1553 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1569 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1686 struct c4iw_dev *rhp; in c4iw_destroy_qp() local
1692 rhp = qhp->rhp; in c4iw_destroy_qp()
1696 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); in c4iw_destroy_qp()
1698 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 0); in c4iw_destroy_qp()
1701 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_destroy_qp()
1703 free_ird(rhp, qhp->attr.max_ird); in c4iw_destroy_qp()
1715 struct c4iw_dev *rhp; in c4iw_create_qp() local
1733 rhp = php->rhp; in c4iw_create_qp()
1734 schp = get_chp(rhp, ((struct c4iw_cq *)attrs->send_cq)->cq.cqid); in c4iw_create_qp()
1735 rchp = get_chp(rhp, ((struct c4iw_cq *)attrs->recv_cq)->cq.cqid); in c4iw_create_qp()
1742 if (attrs->cap.max_recv_wr > rhp->rdev.hw_queue.t4_max_rq_size) in c4iw_create_qp()
1748 if (attrs->cap.max_send_wr > rhp->rdev.hw_queue.t4_max_sq_size) in c4iw_create_qp()
1761 (sqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1766 (rqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1777 ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq, in c4iw_create_qp()
1778 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1786 qhp->rhp = rhp; in c4iw_create_qp()
1809 ret = insert_handle(rhp, &rhp->qpidr, qhp, qhp->wq.sq.qid); in c4iw_create_qp()
1835 uresp.qid_mask = rhp->rdev.qpmask; in c4iw_create_qp()
1906 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_create_qp()
1908 destroy_qp(&rhp->rdev, &qhp->wq, in c4iw_create_qp()
1909 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1918 struct c4iw_dev *rhp; in c4iw_ib_modify_qp() local
1935 rhp = qhp->rhp; in c4iw_ib_modify_qp()
1951 return c4iw_modify_qp(rhp, qhp, mask, &attrs, 0); in c4iw_ib_modify_qp()