Lines Matching refs:ctrl_qp
529 rdev_p->ctrl_qp.workq = dma_alloc_coherent(
533 &(rdev_p->ctrl_qp.dma_addr),
535 if (!rdev_p->ctrl_qp.workq) {
540 dma_unmap_addr_set(&rdev_p->ctrl_qp, mapping,
541 rdev_p->ctrl_qp.dma_addr);
542 rdev_p->ctrl_qp.doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;
543 memset(rdev_p->ctrl_qp.workq, 0,
546 mutex_init(&rdev_p->ctrl_qp.lock);
547 init_waitqueue_head(&rdev_p->ctrl_qp.waitq);
550 base_addr = rdev_p->ctrl_qp.dma_addr;
572 (unsigned long long) rdev_p->ctrl_qp.dma_addr,
573 rdev_p->ctrl_qp.workq, 1 << T3_CTRL_QP_SIZE_LOG2);
585 * sizeof(union t3_wr), rdev_p->ctrl_qp.workq,
586 dma_unmap_addr(&rdev_p->ctrl_qp, mapping));
592 * caller acquires the ctrl_qp lock before the call
606 __func__, rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, len,
610 if (Q_FULL(rdev_p->ctrl_qp.rptr, rdev_p->ctrl_qp.wptr,
612 PDBG("%s ctrl_qp full wtpr 0x%0x rptr 0x%0x, "
614 rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, i);
615 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq,
616 !Q_FULL(rdev_p->ctrl_qp.rptr,
617 rdev_p->ctrl_qp.wptr,
619 PDBG("%s ctrl_qp workq interrupted\n",
623 PDBG("%s ctrl_qp wakeup, continue posting work request "
626 wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr %
668 wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr %
672 ((union t3_wrid *)(wqe+1))->id0.low = rdev_p->ctrl_qp.wptr;
679 Q_GENBIT(rdev_p->ctrl_qp.wptr,
683 ring_doorbell(rdev_p->ctrl_qp.doorbell, T3_CTRL_QP_ID);
685 rdev_p->ctrl_qp.wptr++;
720 mutex_lock(&rdev_p->ctrl_qp.lock);
753 wptr = rdev_p->ctrl_qp.wptr;
754 mutex_unlock(&rdev_p->ctrl_qp.lock);
756 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq,
757 SEQ32_GE(rdev_p->ctrl_qp.rptr,
773 mutex_lock(&rdev_p->ctrl_qp.lock);
776 wptr = rdev_p->ctrl_qp.wptr;
777 mutex_unlock(&rdev_p->ctrl_qp.lock);
781 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq,
782 SEQ32_GE(rdev_p->ctrl_qp.rptr,
901 rdev_p->ctrl_qp.rptr = CQE_WRID_LOW(rsp_msg->cqe) + 1;
902 wake_up_interruptible(&rdev_p->ctrl_qp.waitq);
943 memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp));
1005 printk(KERN_ERR "%s error %d initializing ctrl_qp.\n",