Lines Matching refs:rhp

692 	spin_lock_irqsave(&qhp->rhp->lock, flags);  in ring_kernel_sq_db()
694 if (qhp->rhp->db_state == NORMAL) in ring_kernel_sq_db()
696 is_t5(qhp->rhp->rdev.lldi.adapter_type), NULL); in ring_kernel_sq_db()
698 add_to_fc_list(&qhp->rhp->db_fc_list, &qhp->db_fc_entry); in ring_kernel_sq_db()
702 spin_unlock_irqrestore(&qhp->rhp->lock, flags); in ring_kernel_sq_db()
710 spin_lock_irqsave(&qhp->rhp->lock, flags); in ring_kernel_rq_db()
712 if (qhp->rhp->db_state == NORMAL) in ring_kernel_rq_db()
714 is_t5(qhp->rhp->rdev.lldi.adapter_type), NULL); in ring_kernel_rq_db()
716 add_to_fc_list(&qhp->rhp->db_fc_list, &qhp->db_fc_entry); in ring_kernel_rq_db()
720 spin_unlock_irqrestore(&qhp->rhp->lock, flags); in ring_kernel_rq_db()
801 qhp->rhp->rdev.lldi.adapter_type) ? in c4iw_post_send()
828 qhp->rhp->rdev.lldi.ports[0]); in c4iw_post_send()
842 if (!qhp->rhp->rdev.status_page->db_off) { in c4iw_post_send()
844 is_t5(qhp->rhp->rdev.lldi.adapter_type), wqe); in c4iw_post_send()
897 qhp->rhp->rdev.lldi.ports[0]); in c4iw_post_receive()
916 if (!qhp->rhp->rdev.status_page->db_off) { in c4iw_post_receive()
918 is_t5(qhp->rhp->rdev.lldi.adapter_type), wqe); in c4iw_post_receive()
1098 c4iw_ofld_send(&qhp->rhp->rdev, skb); in post_terminate()
1189 static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, in rdma_fini() argument
1215 ret = c4iw_ofld_send(&rhp->rdev, skb); in rdma_fini()
1219 ret = c4iw_wait_for_reply(&rhp->rdev, &ep->com.wr_wait, qhp->ep->hwtid, in rdma_fini()
1251 static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) in rdma_init() argument
1265 ret = alloc_ird(rhp, qhp->attr.max_ird); in rdma_init()
1315 rhp->rdev.lldi.vr->rq.start); in rdma_init()
1319 ret = c4iw_ofld_send(&rhp->rdev, skb); in rdma_init()
1323 ret = c4iw_wait_for_reply(&rhp->rdev, &qhp->ep->com.wr_wait, in rdma_init()
1328 free_ird(rhp, qhp->attr.max_ird); in rdma_init()
1334 int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, in c4iw_modify_qp() argument
1373 if (attrs->max_ird > cur_max_read_depth(rhp)) { in c4iw_modify_qp()
1420 ret = rdma_init(rhp, qhp); in c4iw_modify_qp()
1445 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1461 ret = rdma_fini(rhp, qhp, ep); in c4iw_modify_qp()
1573 struct c4iw_dev *rhp; in c4iw_destroy_qp() local
1579 rhp = qhp->rhp; in c4iw_destroy_qp()
1583 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); in c4iw_destroy_qp()
1585 c4iw_modify_qp(rhp, qhp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 0); in c4iw_destroy_qp()
1588 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_destroy_qp()
1592 spin_lock_irq(&rhp->lock); in c4iw_destroy_qp()
1595 spin_unlock_irq(&rhp->lock); in c4iw_destroy_qp()
1596 free_ird(rhp, qhp->attr.max_ird); in c4iw_destroy_qp()
1600 destroy_qp(&rhp->rdev, &qhp->wq, in c4iw_destroy_qp()
1601 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_destroy_qp()
1611 struct c4iw_dev *rhp; in c4iw_create_qp() local
1628 rhp = php->rhp; in c4iw_create_qp()
1629 schp = get_chp(rhp, ((struct c4iw_cq *)attrs->send_cq)->cq.cqid); in c4iw_create_qp()
1630 rchp = get_chp(rhp, ((struct c4iw_cq *)attrs->recv_cq)->cq.cqid); in c4iw_create_qp()
1637 if (attrs->cap.max_recv_wr > rhp->rdev.hw_queue.t4_max_rq_size) in c4iw_create_qp()
1643 if (attrs->cap.max_send_wr > rhp->rdev.hw_queue.t4_max_sq_size) in c4iw_create_qp()
1656 (sqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1661 (rqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * in c4iw_create_qp()
1669 ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq, in c4iw_create_qp()
1670 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1678 qhp->rhp = rhp; in c4iw_create_qp()
1700 ret = insert_handle(rhp, &rhp->qpidr, qhp, qhp->wq.sq.qid); in c4iw_create_qp()
1734 uresp.qid_mask = rhp->rdev.qpmask; in c4iw_create_qp()
1778 mm5->addr = (pci_resource_start(rhp->rdev.lldi.pdev, 0) in c4iw_create_qp()
1804 remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid); in c4iw_create_qp()
1806 destroy_qp(&rhp->rdev, &qhp->wq, in c4iw_create_qp()
1807 ucontext ? &ucontext->uctx : &rhp->rdev.uctx); in c4iw_create_qp()
1816 struct c4iw_dev *rhp; in c4iw_ib_modify_qp() local
1833 rhp = qhp->rhp; in c4iw_ib_modify_qp()
1858 if (is_t5(to_c4iw_qp(ibqp)->rhp->rdev.lldi.adapter_type) && in c4iw_ib_modify_qp()
1862 return c4iw_modify_qp(rhp, qhp, mask, &attrs, 0); in c4iw_ib_modify_qp()