Lines Matching refs:rdev

73 		dev_warn(&dev->rdev.lldi.pdev->dev,
94 static void dealloc_oc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
96 c4iw_ocqp_pool_free(rdev, sq->dma_addr, sq->memsize);
99 static void dealloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
101 dma_free_coherent(&(rdev->lldi.pdev->dev), sq->memsize, sq->queue,
105 static void dealloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
108 dealloc_oc_sq(rdev, sq);
110 dealloc_host_sq(rdev, sq);
113 static int alloc_oc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
115 if (!ocqp_support || !ocqp_supported(&rdev->lldi))
117 sq->dma_addr = c4iw_ocqp_pool_alloc(rdev, sq->memsize);
120 sq->phys_addr = rdev->oc_mw_pa + sq->dma_addr -
121 rdev->lldi.vr->ocq.start;
122 sq->queue = (__force union t4_wr *)(rdev->oc_mw_kva + sq->dma_addr -
123 rdev->lldi.vr->ocq.start);
128 static int alloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
130 sq->queue = dma_alloc_coherent(&(rdev->lldi.pdev->dev), sq->memsize,
139 static int alloc_sq(struct c4iw_rdev *rdev, struct t4_sq *sq, int user)
143 ret = alloc_oc_sq(rdev, sq);
145 ret = alloc_host_sq(rdev, sq);
149 static int destroy_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
156 dma_free_coherent(&(rdev->lldi.pdev->dev),
159 dealloc_sq(rdev, &wq->sq);
160 c4iw_rqtpool_free(rdev, wq->rq.rqt_hwaddr, wq->rq.rqt_size);
163 c4iw_put_qpid(rdev, wq->rq.qid, uctx);
164 c4iw_put_qpid(rdev, wq->sq.qid, uctx);
168 static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
172 int user = (uctx != &rdev->uctx);
181 wq->sq.qid = c4iw_get_qpid(rdev, uctx);
185 wq->rq.qid = c4iw_get_qpid(rdev, uctx);
211 wq->rq.rqt_hwaddr = c4iw_rqtpool_alloc(rdev, wq->rq.rqt_size);
217 ret = alloc_sq(rdev, &wq->sq, user);
223 wq->rq.queue = dma_alloc_coherent(&(rdev->lldi.pdev->dev),
238 wq->db = rdev->lldi.db_reg;
239 wq->gts = rdev->lldi.gts_reg;
240 if (user || is_t5(rdev->lldi.adapter_type)) {
243 off = (wq->sq.qid << rdev->qpshift) & PAGE_MASK;
245 wq->sq.udb = (u64 __iomem *)(rdev->bar2_pa + off);
247 off += 128 * (wq->sq.qid & rdev->qpmask) + 8;
248 wq->sq.udb = (u64 __iomem *)(rdev->bar2_kva + off);
250 off = (wq->rq.qid << rdev->qpshift) & PAGE_MASK;
252 wq->rq.udb = (u64 __iomem *)(rdev->bar2_pa + off);
254 off += 128 * (wq->rq.qid & rdev->qpmask) + 8;
255 wq->rq.udb = (u64 __iomem *)(rdev->bar2_kva + off);
258 wq->rdev = rdev;
287 rdev->hw_queue.t4_eq_status_entries;
313 rdev->hw_queue.t4_eq_status_entries;
332 ret = c4iw_ofld_send(rdev, skb);
335 ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, wq->sq.qid, __func__);
346 dma_free_coherent(&(rdev->lldi.pdev->dev),
350 dealloc_sq(rdev, &wq->sq);
352 c4iw_rqtpool_free(rdev, wq->rq.rqt_hwaddr, wq->rq.rqt_size);
358 c4iw_put_qpid(rdev, wq->rq.qid, uctx);
360 c4iw_put_qpid(rdev, wq->sq.qid, uctx);
696 is_t5(qhp->rhp->rdev.lldi.adapter_type), NULL);
714 is_t5(qhp->rhp->rdev.lldi.adapter_type), NULL);
801 qhp->rhp->rdev.lldi.adapter_type) ?
828 qhp->rhp->rdev.lldi.ports[0]);
842 if (!qhp->rhp->rdev.status_page->db_off) {
844 is_t5(qhp->rhp->rdev.lldi.adapter_type), wqe);
897 qhp->rhp->rdev.lldi.ports[0]);
916 if (!qhp->rhp->rdev.status_page->db_off) {
918 is_t5(qhp->rhp->rdev.lldi.adapter_type), wqe);
1098 c4iw_ofld_send(&qhp->rhp->rdev, skb);
1215 ret = c4iw_ofld_send(&rhp->rdev, skb);
1219 ret = c4iw_wait_for_reply(&rhp->rdev, &ep->com.wr_wait, qhp->ep->hwtid,
1315 rhp->rdev.lldi.vr->rq.start);
1319 ret = c4iw_ofld_send(&rhp->rdev, skb);
1323 ret = c4iw_wait_for_reply(&rhp->rdev, &qhp->ep->com.wr_wait,
1600 destroy_qp(&rhp->rdev, &qhp->wq,
1601 ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
1637 if (attrs->cap.max_recv_wr > rhp->rdev.hw_queue.t4_max_rq_size)
1643 if (attrs->cap.max_send_wr > rhp->rdev.hw_queue.t4_max_sq_size)
1656 (sqsize + rhp->rdev.hw_queue.t4_eq_status_entries) *
1661 (rqsize + rhp->rdev.hw_queue.t4_eq_status_entries) *
1669 ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq,
1670 ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
1734 uresp.qid_mask = rhp->rdev.qpmask;
1778 mm5->addr = (pci_resource_start(rhp->rdev.lldi.pdev, 0)
1806 destroy_qp(&rhp->rdev, &qhp->wq,
1807 ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
1858 if (is_t5(to_c4iw_qp(ibqp)->rhp->rdev.lldi.adapter_type) &&