Lines Matching refs:rhp

709 	spin_lock_irqsave(&qhp->rhp->lock, flags);  in ring_kernel_sq_db()
711 if (qhp->rhp->db_state == NORMAL) in ring_kernel_sq_db()
714 add_to_fc_list(&qhp->rhp->db_fc_list, &qhp->db_fc_entry); in ring_kernel_sq_db()
718 spin_unlock_irqrestore(&qhp->rhp->lock, flags); in ring_kernel_sq_db()
726 spin_lock_irqsave(&qhp->rhp->lock, flags); in ring_kernel_rq_db()
728 if (qhp->rhp->db_state == NORMAL) in ring_kernel_rq_db()
731 add_to_fc_list(&qhp->rhp->db_fc_list, &qhp->db_fc_entry); in ring_kernel_rq_db()
735 spin_unlock_irqrestore(&qhp->rhp->lock, flags); in ring_kernel_rq_db()
816 qhp->rhp->rdev.lldi.adapter_type) ? in c4iw_post_send()
843 qhp->rhp->rdev.lldi.ports[0]); in c4iw_post_send()
857 if (!qhp->rhp->rdev.status_page->db_off) { in c4iw_post_send()
911 qhp->rhp->rdev.lldi.ports[0]); in c4iw_post_receive()
930 if (!qhp->rhp->rdev.status_page->db_off) { in c4iw_post_receive()
1111 c4iw_ofld_send(&qhp->rhp->rdev, skb); in post_terminate()
1202 static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, in rdma_fini() argument
1228 ret = c4iw_ofld_send(&rhp->rdev, skb); in rdma_fini()
1232 ret = c4iw_wait_for_reply(&rhp->rdev, &ep->com.wr_wait, qhp->ep->hwtid, in rdma_fini()
1264 static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) in rdma_init() argument
1278 ret = alloc_ird(rhp, qhp->attr.max_ird); in rdma_init()
1328 rhp->rdev.lldi.vr->rq.start); in rdma_init()
1332 ret = c4iw_ofld_send(&rhp->rdev, skb); in rdma_init()
1336 ret = c4iw_wait_for_reply(&rhp->rdev, &qhp->ep->com.wr_wait, in rdma_init()
1341 free_ird(rhp, qhp->attr.max_ird); in rdma_init()
1347 int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, in c4iw_modify_qp() argument
1386 if (attrs->max_ird > cur_max_read_depth(rhp)) { in c4iw_modify_qp()
1433 ret = rdma_init(rhp, qhp); in c4iw_modify_qp()
1458 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1474 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1586 struct c4iw_dev *rhp; in c4iw_destroy_qp() local
1592 rhp = qhp->rhp; in c4iw_destroy_qp()
1596 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); in c4iw_destroy_qp()
1598 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 0); in c4iw_destroy_qp()
1601 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_destroy_qp()
1605 spin_lock_irq(&rhp->lock); in c4iw_destroy_qp()
1608 spin_unlock_irq(&rhp->lock); in c4iw_destroy_qp()
1609 free_ird(rhp, qhp->attr.max_ird); in c4iw_destroy_qp()
1613 destroy_qp(&rhp->rdev, &qhp->wq, in c4iw_destroy_qp()
1614 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_destroy_qp()
1624 struct c4iw_dev *rhp; in c4iw_create_qp() local
1641 rhp = php->rhp; in c4iw_create_qp()
1642 schp = get_chp(rhp, ((struct c4iw_cq *)attrs->send_cq)->cq.cqid); in c4iw_create_qp()
1643 rchp = get_chp(rhp, ((struct c4iw_cq *)attrs->recv_cq)->cq.cqid); in c4iw_create_qp()
1650 if (attrs->cap.max_recv_wr > rhp->rdev.hw_queue.t4_max_rq_size) in c4iw_create_qp()
1656 if (attrs->cap.max_send_wr > rhp->rdev.hw_queue.t4_max_sq_size) in c4iw_create_qp()
1669 (sqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1674 (rqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1682 ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq, in c4iw_create_qp()
1683 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1691 qhp->rhp = rhp; in c4iw_create_qp()
1713 ret = insert_handle(rhp, &rhp->qpidr, qhp, qhp->wq.sq.qid); in c4iw_create_qp()
1747 uresp.qid_mask = rhp->rdev.qpmask; in c4iw_create_qp()
1791 mm5->addr = (pci_resource_start(rhp->rdev.lldi.pdev, 0) in c4iw_create_qp()
1817 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_create_qp()
1819 destroy_qp(&rhp->rdev, &qhp->wq, in c4iw_create_qp()
1820 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1829 struct c4iw_dev *rhp; in c4iw_ib_modify_qp() local
1846 rhp = qhp->rhp; in c4iw_ib_modify_qp()
1871 if (!is_t4(to_c4iw_qp(ibqp)->rhp->rdev.lldi.adapter_type) && in c4iw_ib_modify_qp()
1875 return c4iw_modify_qp(rhp, qhp, mask, &attrs, 0); in c4iw_ib_modify_qp()