Lines Matching refs:ctrl_qp
532 rdev_p->ctrl_qp.workq = dma_alloc_coherent( in cxio_hal_init_ctrl_qp()
536 &(rdev_p->ctrl_qp.dma_addr), in cxio_hal_init_ctrl_qp()
538 if (!rdev_p->ctrl_qp.workq) { in cxio_hal_init_ctrl_qp()
543 dma_unmap_addr_set(&rdev_p->ctrl_qp, mapping, in cxio_hal_init_ctrl_qp()
544 rdev_p->ctrl_qp.dma_addr); in cxio_hal_init_ctrl_qp()
545 rdev_p->ctrl_qp.doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr; in cxio_hal_init_ctrl_qp()
546 memset(rdev_p->ctrl_qp.workq, 0, in cxio_hal_init_ctrl_qp()
549 mutex_init(&rdev_p->ctrl_qp.lock); in cxio_hal_init_ctrl_qp()
550 init_waitqueue_head(&rdev_p->ctrl_qp.waitq); in cxio_hal_init_ctrl_qp()
553 base_addr = rdev_p->ctrl_qp.dma_addr; in cxio_hal_init_ctrl_qp()
575 (unsigned long long) rdev_p->ctrl_qp.dma_addr, in cxio_hal_init_ctrl_qp()
576 rdev_p->ctrl_qp.workq, 1 << T3_CTRL_QP_SIZE_LOG2); in cxio_hal_init_ctrl_qp()
588 * sizeof(union t3_wr), rdev_p->ctrl_qp.workq, in cxio_hal_destroy_ctrl_qp()
589 dma_unmap_addr(&rdev_p->ctrl_qp, mapping)); in cxio_hal_destroy_ctrl_qp()
609 __func__, rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, len, in cxio_hal_ctrl_qp_write_mem()
613 if (Q_FULL(rdev_p->ctrl_qp.rptr, rdev_p->ctrl_qp.wptr, in cxio_hal_ctrl_qp_write_mem()
617 rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, i); in cxio_hal_ctrl_qp_write_mem()
618 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, in cxio_hal_ctrl_qp_write_mem()
619 !Q_FULL(rdev_p->ctrl_qp.rptr, in cxio_hal_ctrl_qp_write_mem()
620 rdev_p->ctrl_qp.wptr, in cxio_hal_ctrl_qp_write_mem()
629 wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr % in cxio_hal_ctrl_qp_write_mem()
671 wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr % in cxio_hal_ctrl_qp_write_mem()
675 ((union t3_wrid *)(wqe+1))->id0.low = rdev_p->ctrl_qp.wptr; in cxio_hal_ctrl_qp_write_mem()
682 Q_GENBIT(rdev_p->ctrl_qp.wptr, in cxio_hal_ctrl_qp_write_mem()
686 ring_doorbell(rdev_p->ctrl_qp.doorbell, T3_CTRL_QP_ID); in cxio_hal_ctrl_qp_write_mem()
688 rdev_p->ctrl_qp.wptr++; in cxio_hal_ctrl_qp_write_mem()
723 mutex_lock(&rdev_p->ctrl_qp.lock); in __cxio_tpt_op()
754 wptr = rdev_p->ctrl_qp.wptr; in __cxio_tpt_op()
755 mutex_unlock(&rdev_p->ctrl_qp.lock); in __cxio_tpt_op()
757 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, in __cxio_tpt_op()
758 SEQ32_GE(rdev_p->ctrl_qp.rptr, in __cxio_tpt_op()
774 mutex_lock(&rdev_p->ctrl_qp.lock); in cxio_write_pbl()
777 wptr = rdev_p->ctrl_qp.wptr; in cxio_write_pbl()
778 mutex_unlock(&rdev_p->ctrl_qp.lock); in cxio_write_pbl()
782 if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, in cxio_write_pbl()
783 SEQ32_GE(rdev_p->ctrl_qp.rptr, in cxio_write_pbl()
902 rdev_p->ctrl_qp.rptr = CQE_WRID_LOW(rsp_msg->cqe) + 1; in cxio_hal_ev_handler()
903 wake_up_interruptible(&rdev_p->ctrl_qp.waitq); in cxio_hal_ev_handler()
944 memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp)); in cxio_rdev_open()