rdev_p 71 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_hal_cq_op(struct cxio_rdev *rdev_p, struct t3_cq *cq, rdev_p 82 drivers/infiniband/hw/cxgb3/cxio_hal.c ret = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_OP, &setup); rdev_p 113 drivers/infiniband/hw/cxgb3/cxio_hal.c pr_err("%s: stalled rnic\n", rdev_p->dev_name); rdev_p 124 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_clear_cq_ctx(struct cxio_rdev *rdev_p, u32 cqid) rdev_p 133 drivers/infiniband/hw/cxgb3/cxio_hal.c return (rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_SETUP, &setup)); rdev_p 136 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_clear_qp_ctx(struct cxio_rdev *rdev_p, u32 qpid) rdev_p 153 drivers/infiniband/hw/cxgb3/cxio_hal.c return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb); rdev_p 156 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq, int kernel) rdev_p 162 drivers/infiniband/hw/cxgb3/cxio_hal.c cq->cqid = cxio_hal_get_cqid(rdev_p->rscp); rdev_p 170 drivers/infiniband/hw/cxgb3/cxio_hal.c cq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev), size, rdev_p 182 drivers/infiniband/hw/cxgb3/cxio_hal.c if (rdev_p->t3cdev_p->type != T3A) rdev_p 186 drivers/infiniband/hw/cxgb3/cxio_hal.c return (rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_SETUP, &setup)); rdev_p 189 drivers/infiniband/hw/cxgb3/cxio_hal.c static u32 get_qpid(struct cxio_rdev *rdev_p, struct cxio_ucontext *uctx) rdev_p 203 drivers/infiniband/hw/cxgb3/cxio_hal.c qpid = cxio_hal_get_qpid(rdev_p->rscp); rdev_p 206 drivers/infiniband/hw/cxgb3/cxio_hal.c for (i = qpid+1; i & rdev_p->qpmask; i++) { rdev_p 220 drivers/infiniband/hw/cxgb3/cxio_hal.c static void put_qpid(struct cxio_rdev *rdev_p, u32 qpid, rdev_p 235 drivers/infiniband/hw/cxgb3/cxio_hal.c void cxio_release_ucontext(struct cxio_rdev *rdev_p, struct cxio_ucontext *uctx) rdev_p 244 drivers/infiniband/hw/cxgb3/cxio_hal.c if (!(entry->qpid & rdev_p->qpmask)) rdev_p 245 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_put_qpid(rdev_p->rscp, entry->qpid); rdev_p 251 drivers/infiniband/hw/cxgb3/cxio_hal.c void cxio_init_ucontext(struct cxio_rdev *rdev_p, struct cxio_ucontext *uctx) rdev_p 257 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain, rdev_p 263 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->qpid = get_qpid(rdev_p, uctx); rdev_p 271 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->rq_addr = cxio_hal_rqtpool_alloc(rdev_p, rqsize); rdev_p 279 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev), rdev_p 286 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr; rdev_p 288 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->udb = (u64)rdev_p->rnic_info.udbell_physbase + rdev_p 289 drivers/infiniband/hw/cxgb3/cxio_hal.c (wq->qpid << rdev_p->qpshift); rdev_p 290 drivers/infiniband/hw/cxgb3/cxio_hal.c wq->rdev = rdev_p; rdev_p 297 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_rqtpool_free(rdev_p, wq->rq_addr, rqsize); rdev_p 301 drivers/infiniband/hw/cxgb3/cxio_hal.c put_qpid(rdev_p, wq->qpid, uctx); rdev_p 305 drivers/infiniband/hw/cxgb3/cxio_hal.c void cxio_destroy_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq) rdev_p 307 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_clear_cq_ctx(rdev_p, cq->cqid); rdev_p 309 drivers/infiniband/hw/cxgb3/cxio_hal.c dma_free_coherent(&(rdev_p->rnic_info.pdev->dev), rdev_p 313 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_put_cqid(rdev_p->rscp, cq->cqid); rdev_p 316 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_destroy_qp(struct cxio_rdev *rdev_p, struct t3_wq *wq, rdev_p 319 drivers/infiniband/hw/cxgb3/cxio_hal.c dma_free_coherent(&(rdev_p->rnic_info.pdev->dev), rdev_p 324 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_rqtpool_free(rdev_p, wq->rq_addr, (1UL << wq->rq_size_log2)); rdev_p 326 drivers/infiniband/hw/cxgb3/cxio_hal.c put_qpid(rdev_p, wq->qpid, uctx); rdev_p 478 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_init_ctrl_cq(struct cxio_rdev *rdev_p) rdev_p 489 drivers/infiniband/hw/cxgb3/cxio_hal.c return (rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_CQ_SETUP, &setup)); rdev_p 492 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p) rdev_p 505 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_init_ctrl_cq(rdev_p); rdev_p 510 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.workq = dma_alloc_coherent( rdev_p 511 drivers/infiniband/hw/cxgb3/cxio_hal.c &(rdev_p->rnic_info.pdev->dev), rdev_p 514 drivers/infiniband/hw/cxgb3/cxio_hal.c &(rdev_p->ctrl_qp.dma_addr), rdev_p 516 drivers/infiniband/hw/cxgb3/cxio_hal.c if (!rdev_p->ctrl_qp.workq) { rdev_p 521 drivers/infiniband/hw/cxgb3/cxio_hal.c dma_unmap_addr_set(&rdev_p->ctrl_qp, mapping, rdev_p 522 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.dma_addr); rdev_p 523 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr; rdev_p 525 drivers/infiniband/hw/cxgb3/cxio_hal.c mutex_init(&rdev_p->ctrl_qp.lock); rdev_p 526 drivers/infiniband/hw/cxgb3/cxio_hal.c init_waitqueue_head(&rdev_p->ctrl_qp.waitq); rdev_p 529 drivers/infiniband/hw/cxgb3/cxio_hal.c base_addr = rdev_p->ctrl_qp.dma_addr; rdev_p 550 drivers/infiniband/hw/cxgb3/cxio_hal.c &rdev_p->ctrl_qp.dma_addr, rdev_p->ctrl_qp.workq, rdev_p 553 drivers/infiniband/hw/cxgb3/cxio_hal.c return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb); rdev_p 559 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_destroy_ctrl_qp(struct cxio_rdev *rdev_p) rdev_p 561 drivers/infiniband/hw/cxgb3/cxio_hal.c dma_free_coherent(&(rdev_p->rnic_info.pdev->dev), rdev_p 563 drivers/infiniband/hw/cxgb3/cxio_hal.c * sizeof(union t3_wr), rdev_p->ctrl_qp.workq, rdev_p 564 drivers/infiniband/hw/cxgb3/cxio_hal.c dma_unmap_addr(&rdev_p->ctrl_qp, mapping)); rdev_p 565 drivers/infiniband/hw/cxgb3/cxio_hal.c return cxio_hal_clear_qp_ctx(rdev_p, T3_CTRL_QP_ID); rdev_p 572 drivers/infiniband/hw/cxgb3/cxio_hal.c static int cxio_hal_ctrl_qp_write_mem(struct cxio_rdev *rdev_p, u32 addr, rdev_p 584 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, len, rdev_p 588 drivers/infiniband/hw/cxgb3/cxio_hal.c if (Q_FULL(rdev_p->ctrl_qp.rptr, rdev_p->ctrl_qp.wptr, rdev_p 592 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.wptr, rdev_p->ctrl_qp.rptr, i); rdev_p 593 drivers/infiniband/hw/cxgb3/cxio_hal.c if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, rdev_p 594 drivers/infiniband/hw/cxgb3/cxio_hal.c !Q_FULL(rdev_p->ctrl_qp.rptr, rdev_p 595 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.wptr, rdev_p 604 drivers/infiniband/hw/cxgb3/cxio_hal.c wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr % rdev_p 646 drivers/infiniband/hw/cxgb3/cxio_hal.c wqe = (__be64 *)(rdev_p->ctrl_qp.workq + (rdev_p->ctrl_qp.wptr % rdev_p 650 drivers/infiniband/hw/cxgb3/cxio_hal.c ((union t3_wrid *)(wqe+1))->id0.low = rdev_p->ctrl_qp.wptr; rdev_p 657 drivers/infiniband/hw/cxgb3/cxio_hal.c Q_GENBIT(rdev_p->ctrl_qp.wptr, rdev_p 661 drivers/infiniband/hw/cxgb3/cxio_hal.c ring_doorbell(rdev_p->ctrl_qp.doorbell, T3_CTRL_QP_ID); rdev_p 663 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.wptr++; rdev_p 672 drivers/infiniband/hw/cxgb3/cxio_hal.c static int __cxio_tpt_op(struct cxio_rdev *rdev_p, u32 reset_tpt_entry, rdev_p 683 drivers/infiniband/hw/cxgb3/cxio_hal.c if (cxio_fatal_error(rdev_p)) rdev_p 690 drivers/infiniband/hw/cxgb3/cxio_hal.c stag_idx = cxio_hal_get_stag(rdev_p->rscp); rdev_p 698 drivers/infiniband/hw/cxgb3/cxio_hal.c mutex_lock(&rdev_p->ctrl_qp.lock); rdev_p 713 drivers/infiniband/hw/cxgb3/cxio_hal.c tpt.rsvd_pbl_addr = cpu_to_be32(V_TPT_PBL_ADDR(PBL_OFF(rdev_p, pbl_addr)>>3)); rdev_p 720 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_ctrl_qp_write_mem(rdev_p, rdev_p 722 drivers/infiniband/hw/cxgb3/cxio_hal.c (rdev_p->rnic_info.tpt_base >> 5), rdev_p 727 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_put_stag(rdev_p->rscp, stag_idx); rdev_p 729 drivers/infiniband/hw/cxgb3/cxio_hal.c wptr = rdev_p->ctrl_qp.wptr; rdev_p 730 drivers/infiniband/hw/cxgb3/cxio_hal.c mutex_unlock(&rdev_p->ctrl_qp.lock); rdev_p 732 drivers/infiniband/hw/cxgb3/cxio_hal.c if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, rdev_p 733 drivers/infiniband/hw/cxgb3/cxio_hal.c SEQ32_GE(rdev_p->ctrl_qp.rptr, rdev_p 739 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_write_pbl(struct cxio_rdev *rdev_p, __be64 *pbl, rdev_p 746 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, pbl_addr, rdev_p->rnic_info.pbl_base, rdev_p 749 drivers/infiniband/hw/cxgb3/cxio_hal.c mutex_lock(&rdev_p->ctrl_qp.lock); rdev_p 750 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_ctrl_qp_write_mem(rdev_p, pbl_addr >> 5, pbl_size << 3, rdev_p 752 drivers/infiniband/hw/cxgb3/cxio_hal.c wptr = rdev_p->ctrl_qp.wptr; rdev_p 753 drivers/infiniband/hw/cxgb3/cxio_hal.c mutex_unlock(&rdev_p->ctrl_qp.lock); rdev_p 757 drivers/infiniband/hw/cxgb3/cxio_hal.c if (wait_event_interruptible(rdev_p->ctrl_qp.waitq, rdev_p 758 drivers/infiniband/hw/cxgb3/cxio_hal.c SEQ32_GE(rdev_p->ctrl_qp.rptr, rdev_p 765 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_register_phys_mem(struct cxio_rdev *rdev_p, u32 *stag, u32 pdid, rdev_p 770 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 0, stag, 1, pdid, TPT_NON_SHARED_MR, perm, rdev_p 774 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_reregister_phys_mem(struct cxio_rdev *rdev_p, u32 *stag, u32 pdid, rdev_p 778 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 0, stag, 1, pdid, TPT_NON_SHARED_MR, perm, rdev_p 782 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_dereg_mem(struct cxio_rdev *rdev_p, u32 stag, u32 pbl_size, rdev_p 785 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 1, &stag, 0, 0, 0, 0, 0, 0ULL, 0, 0, rdev_p 789 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_allocate_window(struct cxio_rdev *rdev_p, u32 * stag, u32 pdid) rdev_p 792 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 0, stag, 0, pdid, TPT_MW, 0, 0, 0ULL, 0, 0, rdev_p 796 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_deallocate_window(struct cxio_rdev *rdev_p, u32 stag) rdev_p 798 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 1, &stag, 0, 0, 0, 0, 0, 0ULL, 0, 0, rdev_p 802 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_allocate_stag(struct cxio_rdev *rdev_p, u32 *stag, u32 pdid, u32 pbl_size, u32 pbl_addr) rdev_p 805 drivers/infiniband/hw/cxgb3/cxio_hal.c return __cxio_tpt_op(rdev_p, 0, stag, 0, pdid, TPT_NON_SHARED_MR, rdev_p 809 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr) rdev_p 815 drivers/infiniband/hw/cxgb3/cxio_hal.c pr_debug("%s rdev_p %p\n", __func__, rdev_p); rdev_p 825 drivers/infiniband/hw/cxgb3/cxio_hal.c wqe->rq_addr = cpu_to_be32(attr->rq_addr - rdev_p->rnic_info.rqt_base); rdev_p 840 drivers/infiniband/hw/cxgb3/cxio_hal.c return iwch_cxgb3_ofld_send(rdev_p->t3cdev_p, skb); rdev_p 856 drivers/infiniband/hw/cxgb3/cxio_hal.c struct cxio_rdev *rdev_p = NULL; rdev_p 868 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p = (struct cxio_rdev *)t3cdev_p->ulp; rdev_p 869 drivers/infiniband/hw/cxgb3/cxio_hal.c if (!rdev_p) { rdev_p 875 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->ctrl_qp.rptr = CQE_WRID_LOW(rsp_msg->cqe) + 1; rdev_p 876 drivers/infiniband/hw/cxgb3/cxio_hal.c wake_up_interruptible(&rdev_p->ctrl_qp.waitq); rdev_p 881 drivers/infiniband/hw/cxgb3/cxio_hal.c (*cxio_ev_cb) (rdev_p, skb); rdev_p 889 drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_rdev_open(struct cxio_rdev *rdev_p) rdev_p 893 drivers/infiniband/hw/cxgb3/cxio_hal.c if (strlen(rdev_p->dev_name)) { rdev_p 894 drivers/infiniband/hw/cxgb3/cxio_hal.c if (cxio_hal_find_rdev_by_name(rdev_p->dev_name)) { rdev_p 897 drivers/infiniband/hw/cxgb3/cxio_hal.c netdev_p = dev_get_by_name(&init_net, rdev_p->dev_name); rdev_p 902 drivers/infiniband/hw/cxgb3/cxio_hal.c } else if (rdev_p->t3cdev_p) { rdev_p 903 drivers/infiniband/hw/cxgb3/cxio_hal.c if (cxio_hal_find_rdev_by_t3cdev(rdev_p->t3cdev_p)) { rdev_p 906 drivers/infiniband/hw/cxgb3/cxio_hal.c netdev_p = rdev_p->t3cdev_p->lldev; rdev_p 907 drivers/infiniband/hw/cxgb3/cxio_hal.c strncpy(rdev_p->dev_name, rdev_p->t3cdev_p->name, rdev_p 914 drivers/infiniband/hw/cxgb3/cxio_hal.c list_add_tail(&rdev_p->entry, &rdev_list); rdev_p 916 drivers/infiniband/hw/cxgb3/cxio_hal.c pr_debug("%s opening rnic dev %s\n", __func__, rdev_p->dev_name); rdev_p 917 drivers/infiniband/hw/cxgb3/cxio_hal.c memset(&rdev_p->ctrl_qp, 0, sizeof(rdev_p->ctrl_qp)); rdev_p 918 drivers/infiniband/hw/cxgb3/cxio_hal.c if (!rdev_p->t3cdev_p) rdev_p 919 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->t3cdev_p = dev2t3cdev(netdev_p); rdev_p 920 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->t3cdev_p->ulp = (void *) rdev_p; rdev_p 922 drivers/infiniband/hw/cxgb3/cxio_hal.c err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_EMBEDDED_INFO, rdev_p 923 drivers/infiniband/hw/cxgb3/cxio_hal.c &(rdev_p->fw_info)); rdev_p 926 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, rdev_p->t3cdev_p, err); rdev_p 929 drivers/infiniband/hw/cxgb3/cxio_hal.c if (G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers) != CXIO_FW_MAJ) { rdev_p 932 drivers/infiniband/hw/cxgb3/cxio_hal.c G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers)); rdev_p 937 drivers/infiniband/hw/cxgb3/cxio_hal.c err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS, rdev_p 938 drivers/infiniband/hw/cxgb3/cxio_hal.c &(rdev_p->rnic_info)); rdev_p 941 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, rdev_p->t3cdev_p, err); rdev_p 944 drivers/infiniband/hw/cxgb3/cxio_hal.c err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_PORTS, rdev_p 945 drivers/infiniband/hw/cxgb3/cxio_hal.c &(rdev_p->port_info)); rdev_p 948 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, rdev_p->t3cdev_p, err); rdev_p 956 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_init_ucontext(rdev_p, &rdev_p->uctx); rdev_p 957 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->qpshift = PAGE_SHIFT - rdev_p 959 drivers/infiniband/hw/cxgb3/cxio_hal.c ilog2(rdev_p->rnic_info.udbell_len >> rdev_p 961 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->qpnr = rdev_p->rnic_info.udbell_len >> PAGE_SHIFT; rdev_p 962 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->qpmask = (65536 >> ilog2(rdev_p->qpnr)) - 1; rdev_p 964 drivers/infiniband/hw/cxgb3/cxio_hal.c __func__, rdev_p->dev_name, rdev_p->rnic_info.tpt_base, rdev_p 965 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.tpt_top, cxio_num_stags(rdev_p), rdev_p 966 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.pbl_base, rdev_p 967 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.pbl_top, rdev_p->rnic_info.rqt_base, rdev_p 968 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.rqt_top); rdev_p 970 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.udbell_len, rdev_p 971 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->rnic_info.udbell_physbase, rdev_p->rnic_info.kdb_addr, rdev_p 972 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->qpshift, rdev_p->qpnr, rdev_p->qpmask); rdev_p 974 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_init_ctrl_qp(rdev_p); rdev_p 979 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_init_resource(rdev_p, cxio_num_stags(rdev_p), 0, rdev_p 987 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_pblpool_create(rdev_p); rdev_p 993 drivers/infiniband/hw/cxgb3/cxio_hal.c err = cxio_hal_rqtpool_create(rdev_p); rdev_p 1001 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_pblpool_destroy(rdev_p); rdev_p 1003 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_destroy_resource(rdev_p->rscp); rdev_p 1005 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_destroy_ctrl_qp(rdev_p); rdev_p 1007 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->t3cdev_p->ulp = NULL; rdev_p 1008 drivers/infiniband/hw/cxgb3/cxio_hal.c list_del(&rdev_p->entry); rdev_p 1012 drivers/infiniband/hw/cxgb3/cxio_hal.c void cxio_rdev_close(struct cxio_rdev *rdev_p) rdev_p 1014 drivers/infiniband/hw/cxgb3/cxio_hal.c if (rdev_p) { rdev_p 1015 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_pblpool_destroy(rdev_p); rdev_p 1016 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_rqtpool_destroy(rdev_p); rdev_p 1017 drivers/infiniband/hw/cxgb3/cxio_hal.c list_del(&rdev_p->entry); rdev_p 1018 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_destroy_ctrl_qp(rdev_p); rdev_p 1019 drivers/infiniband/hw/cxgb3/cxio_hal.c cxio_hal_destroy_resource(rdev_p->rscp); rdev_p 1020 drivers/infiniband/hw/cxgb3/cxio_hal.c rdev_p->t3cdev_p->ulp = NULL; rdev_p 119 drivers/infiniband/hw/cxgb3/cxio_hal.h static inline int cxio_fatal_error(struct cxio_rdev *rdev_p) rdev_p 121 drivers/infiniband/hw/cxgb3/cxio_hal.h return rdev_p->flags & CXIO_ERROR_FATAL; rdev_p 124 drivers/infiniband/hw/cxgb3/cxio_hal.h static inline int cxio_num_stags(struct cxio_rdev *rdev_p) rdev_p 126 drivers/infiniband/hw/cxgb3/cxio_hal.h return min((int)T3_MAX_NUM_STAG, (int)((rdev_p->rnic_info.tpt_top - rdev_p->rnic_info.tpt_base) >> 5)); rdev_p 129 drivers/infiniband/hw/cxgb3/cxio_hal.h typedef void (*cxio_hal_ev_callback_func_t) (struct cxio_rdev * rdev_p, rdev_p 169 drivers/infiniband/hw/cxgb3/cxio_hal.h int cxio_write_pbl(struct cxio_rdev *rdev_p, __be64 *pbl, rdev_p 111 drivers/infiniband/hw/cxgb3/cxio_resource.c static int cxio_init_qpid_fifo(struct cxio_rdev *rdev_p) rdev_p 115 drivers/infiniband/hw/cxgb3/cxio_resource.c spin_lock_init(&rdev_p->rscp->qpid_fifo_lock); rdev_p 117 drivers/infiniband/hw/cxgb3/cxio_resource.c if (kfifo_alloc(&rdev_p->rscp->qpid_fifo, T3_MAX_NUM_QP * sizeof(u32), rdev_p 122 drivers/infiniband/hw/cxgb3/cxio_resource.c if (!(i & rdev_p->qpmask)) rdev_p 123 drivers/infiniband/hw/cxgb3/cxio_resource.c kfifo_in(&rdev_p->rscp->qpid_fifo, rdev_p 140 drivers/infiniband/hw/cxgb3/cxio_resource.c int cxio_hal_init_resource(struct cxio_rdev *rdev_p, rdev_p 150 drivers/infiniband/hw/cxgb3/cxio_resource.c rdev_p->rscp = rscp; rdev_p 156 drivers/infiniband/hw/cxgb3/cxio_resource.c err = cxio_init_qpid_fifo(rdev_p); rdev_p 257 drivers/infiniband/hw/cxgb3/cxio_resource.c u32 cxio_hal_pblpool_alloc(struct cxio_rdev *rdev_p, int size) rdev_p 259 drivers/infiniband/hw/cxgb3/cxio_resource.c unsigned long addr = gen_pool_alloc(rdev_p->pbl_pool, size); rdev_p 264 drivers/infiniband/hw/cxgb3/cxio_resource.c void cxio_hal_pblpool_free(struct cxio_rdev *rdev_p, u32 addr, int size) rdev_p 267 drivers/infiniband/hw/cxgb3/cxio_resource.c gen_pool_free(rdev_p->pbl_pool, (unsigned long)addr, size); rdev_p 270 drivers/infiniband/hw/cxgb3/cxio_resource.c int cxio_hal_pblpool_create(struct cxio_rdev *rdev_p) rdev_p 274 drivers/infiniband/hw/cxgb3/cxio_resource.c rdev_p->pbl_pool = gen_pool_create(MIN_PBL_SHIFT, -1); rdev_p 275 drivers/infiniband/hw/cxgb3/cxio_resource.c if (!rdev_p->pbl_pool) rdev_p 278 drivers/infiniband/hw/cxgb3/cxio_resource.c pbl_start = rdev_p->rnic_info.pbl_base; rdev_p 279 drivers/infiniband/hw/cxgb3/cxio_resource.c pbl_chunk = rdev_p->rnic_info.pbl_top - pbl_start + 1; rdev_p 281 drivers/infiniband/hw/cxgb3/cxio_resource.c while (pbl_start < rdev_p->rnic_info.pbl_top) { rdev_p 282 drivers/infiniband/hw/cxgb3/cxio_resource.c pbl_chunk = min(rdev_p->rnic_info.pbl_top - pbl_start + 1, rdev_p 284 drivers/infiniband/hw/cxgb3/cxio_resource.c if (gen_pool_add(rdev_p->pbl_pool, pbl_start, pbl_chunk, -1)) { rdev_p 290 drivers/infiniband/hw/cxgb3/cxio_resource.c rdev_p->rnic_info.pbl_top - pbl_start); rdev_p 304 drivers/infiniband/hw/cxgb3/cxio_resource.c void cxio_hal_pblpool_destroy(struct cxio_rdev *rdev_p) rdev_p 306 drivers/infiniband/hw/cxgb3/cxio_resource.c gen_pool_destroy(rdev_p->pbl_pool); rdev_p 316 drivers/infiniband/hw/cxgb3/cxio_resource.c u32 cxio_hal_rqtpool_alloc(struct cxio_rdev *rdev_p, int size) rdev_p 318 drivers/infiniband/hw/cxgb3/cxio_resource.c unsigned long addr = gen_pool_alloc(rdev_p->rqt_pool, size << 6); rdev_p 323 drivers/infiniband/hw/cxgb3/cxio_resource.c void cxio_hal_rqtpool_free(struct cxio_rdev *rdev_p, u32 addr, int size) rdev_p 326 drivers/infiniband/hw/cxgb3/cxio_resource.c gen_pool_free(rdev_p->rqt_pool, (unsigned long)addr, size << 6); rdev_p 329 drivers/infiniband/hw/cxgb3/cxio_resource.c int cxio_hal_rqtpool_create(struct cxio_rdev *rdev_p) rdev_p 332 drivers/infiniband/hw/cxgb3/cxio_resource.c rdev_p->rqt_pool = gen_pool_create(MIN_RQT_SHIFT, -1); rdev_p 333 drivers/infiniband/hw/cxgb3/cxio_resource.c if (rdev_p->rqt_pool) rdev_p 334 drivers/infiniband/hw/cxgb3/cxio_resource.c for (i = rdev_p->rnic_info.rqt_base; rdev_p 335 drivers/infiniband/hw/cxgb3/cxio_resource.c i <= rdev_p->rnic_info.rqt_top - RQT_CHUNK + 1; rdev_p 337 drivers/infiniband/hw/cxgb3/cxio_resource.c gen_pool_add(rdev_p->rqt_pool, i, RQT_CHUNK, -1); rdev_p 338 drivers/infiniband/hw/cxgb3/cxio_resource.c return rdev_p->rqt_pool ? 0 : -ENOMEM; rdev_p 341 drivers/infiniband/hw/cxgb3/cxio_resource.c void cxio_hal_rqtpool_destroy(struct cxio_rdev *rdev_p) rdev_p 343 drivers/infiniband/hw/cxgb3/cxio_resource.c gen_pool_destroy(rdev_p->rqt_pool); rdev_p 46 drivers/infiniband/hw/cxgb3/cxio_resource.h extern int cxio_hal_init_resource(struct cxio_rdev *rdev_p, rdev_p 58 drivers/infiniband/hw/cxgb3/cxio_resource.h #define PBL_OFF(rdev_p, a) ( (a) - (rdev_p)->rnic_info.pbl_base ) rdev_p 59 drivers/infiniband/hw/cxgb3/cxio_resource.h extern int cxio_hal_pblpool_create(struct cxio_rdev *rdev_p); rdev_p 60 drivers/infiniband/hw/cxgb3/cxio_resource.h extern void cxio_hal_pblpool_destroy(struct cxio_rdev *rdev_p); rdev_p 61 drivers/infiniband/hw/cxgb3/cxio_resource.h extern u32 cxio_hal_pblpool_alloc(struct cxio_rdev *rdev_p, int size); rdev_p 62 drivers/infiniband/hw/cxgb3/cxio_resource.h extern void cxio_hal_pblpool_free(struct cxio_rdev *rdev_p, u32 addr, int size); rdev_p 64 drivers/infiniband/hw/cxgb3/cxio_resource.h #define RQT_OFF(rdev_p, a) ( (a) - (rdev_p)->rnic_info.rqt_base ) rdev_p 65 drivers/infiniband/hw/cxgb3/cxio_resource.h extern int cxio_hal_rqtpool_create(struct cxio_rdev *rdev_p); rdev_p 66 drivers/infiniband/hw/cxgb3/cxio_resource.h extern void cxio_hal_rqtpool_destroy(struct cxio_rdev *rdev_p); rdev_p 67 drivers/infiniband/hw/cxgb3/cxio_resource.h extern u32 cxio_hal_rqtpool_alloc(struct cxio_rdev *rdev_p, int size); rdev_p 68 drivers/infiniband/hw/cxgb3/cxio_resource.h extern void cxio_hal_rqtpool_free(struct cxio_rdev *rdev_p, u32 addr, int size); rdev_p 153 drivers/infiniband/hw/cxgb3/iwch.h extern void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb); rdev_p 107 drivers/infiniband/hw/cxgb3/iwch_ev.c void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) rdev_p 116 drivers/infiniband/hw/cxgb3/iwch_ev.c rnicp = (struct iwch_dev *) rdev_p->ulp; rdev_p 241 drivers/infiniband/hw/cxgb3/iwch_provider.c struct cxio_rdev *rdev_p; rdev_p 254 drivers/infiniband/hw/cxgb3/iwch_provider.c rdev_p = &(to_iwch_dev(context->device)->rdev); rdev_p 263 drivers/infiniband/hw/cxgb3/iwch_provider.c if ((addr >= rdev_p->rnic_info.udbell_physbase) && rdev_p 264 drivers/infiniband/hw/cxgb3/iwch_provider.c (addr < (rdev_p->rnic_info.udbell_physbase + rdev_p 265 drivers/infiniband/hw/cxgb3/iwch_provider.c rdev_p->rnic_info.udbell_len))) { rdev_p 76 drivers/infiniband/hw/cxgb4/iw_cxgb4.h #define PBL_OFF(rdev_p, a) ((a) - (rdev_p)->lldi.vr->pbl.start) rdev_p 77 drivers/infiniband/hw/cxgb4/iw_cxgb4.h #define RQT_OFF(rdev_p, a) ((a) - (rdev_p)->lldi.vr->rq.start)