rcfw 143 drivers/infiniband/hw/bnxt_re/bnxt_re.h struct bnxt_qplib_rcfw rcfw; rcfw 148 drivers/infiniband/hw/bnxt_re/hw_counters.c rc = bnxt_qplib_get_roce_stats(&rdev->rcfw, &rdev->stats); rcfw 85 drivers/infiniband/hw/bnxt_re/main.c rdev->rcfw.res = NULL; rcfw 101 drivers/infiniband/hw/bnxt_re/main.c rdev->rcfw.res = &rdev->qplib_res; rcfw 197 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_set_func_resources(&rdev->qplib_res, &rdev->rcfw, rcfw 214 drivers/infiniband/hw/bnxt_re/main.c struct bnxt_qplib_rcfw *rcfw = &rdev->rcfw; rcfw 223 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_rcfw_stop_irq(rcfw, false); rcfw 230 drivers/infiniband/hw/bnxt_re/main.c struct bnxt_qplib_rcfw *rcfw = &rdev->rcfw; rcfw 250 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_rcfw_start_irq(rcfw, msix_ent[BNXT_RE_AEQ_IDX].vector, rcfw 830 drivers/infiniband/hw/bnxt_re/main.c static int bnxt_re_aeq_handler(struct bnxt_qplib_rcfw *rcfw, rcfw 912 drivers/infiniband/hw/bnxt_re/main.c if (rdev->qplib_res.rcfw) rcfw 966 drivers/infiniband/hw/bnxt_re/main.c if (rdev->qplib_res.rcfw) { rcfw 968 drivers/infiniband/hw/bnxt_re/main.c rdev->qplib_res.rcfw = NULL; rcfw 981 drivers/infiniband/hw/bnxt_re/main.c rdev->qplib_res.rcfw = &rdev->rcfw; rcfw 982 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_get_dev_attr(&rdev->rcfw, &rdev->dev_attr, rcfw 1038 drivers/infiniband/hw/bnxt_re/main.c rdev->qplib_res.rcfw = NULL; rcfw 1299 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_deinit_rcfw(&rdev->rcfw); rcfw 1305 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_disable_rcfw_channel(&rdev->rcfw); rcfw 1307 drivers/infiniband/hw/bnxt_re/main.c bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id, type); rcfw 1308 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_free_rcfw_channel(&rdev->rcfw); rcfw 1380 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_alloc_rcfw_channel(rdev->en_dev->pdev, &rdev->rcfw, rcfw 1388 drivers/infiniband/hw/bnxt_re/main.c pg_map = rdev->rcfw.creq.pbl[PBL_LVL_0].pg_map_arr; rcfw 1389 drivers/infiniband/hw/bnxt_re/main.c pages = rdev->rcfw.creq.pbl[rdev->rcfw.creq.level].pg_count; rcfw 1393 drivers/infiniband/hw/bnxt_re/main.c ridx, &rdev->rcfw.creq_ring_id); rcfw 1400 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_enable_rcfw_channel(rdev->en_dev->pdev, &rdev->rcfw, rcfw 1408 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_get_dev_attr(&rdev->rcfw, &rdev->dev_attr, rcfw 1429 drivers/infiniband/hw/bnxt_re/main.c rc = bnxt_qplib_init_rcfw(&rdev->rcfw, &rdev->qplib_ctx, rcfw 1484 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_disable_rcfw_channel(&rdev->rcfw); rcfw 1487 drivers/infiniband/hw/bnxt_re/main.c bnxt_re_net_ring_free(rdev, rdev->rcfw.creq_ring_id, type); rcfw 1489 drivers/infiniband/hw/bnxt_re/main.c bnxt_qplib_free_rcfw_channel(&rdev->rcfw); rcfw 513 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 524 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (struct cmdq_base *)&req, rcfw 535 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 585 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 636 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 648 drivers/infiniband/hw/bnxt_re/qplib_fp.c sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); rcfw 652 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 655 drivers/infiniband/hw/bnxt_re/qplib_fp.c bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); rcfw 724 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 836 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 843 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_id = qp->id; rcfw 844 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_handle = (void *)qp; rcfw 862 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 1060 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 1070 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_id = qp->id; rcfw 1071 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_handle = (void *)qp; rcfw 1184 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 1280 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 1290 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 1301 drivers/infiniband/hw/bnxt_re/qplib_fp.c sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); rcfw 1308 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 1367 drivers/infiniband/hw/bnxt_re/qplib_fp.c bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); rcfw 1416 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 1422 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_id = BNXT_QPLIB_QP_ID_INVALID; rcfw 1423 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_handle = NULL; rcfw 1428 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 1431 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_id = qp->id; rcfw 1432 drivers/infiniband/hw/bnxt_re/qplib_fp.c rcfw->qp_tbl[qp->id].qp_handle = qp; rcfw 1929 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 1947 drivers/infiniband/hw/bnxt_re/qplib_fp.c dev_err(&rcfw->pdev->dev, rcfw 1973 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 1998 drivers/infiniband/hw/bnxt_re/qplib_fp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 2007 drivers/infiniband/hw/bnxt_re/qplib_fp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 56 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c static int __wait_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie) rcfw 61 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c cbit = cookie % rcfw->cmdq_depth; rcfw 62 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = wait_event_timeout(rcfw->waitq, rcfw 63 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c !test_bit(cbit, rcfw->cmdq_bitmap), rcfw 68 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c static int __block_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie) rcfw 73 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c cbit = cookie % rcfw->cmdq_depth; rcfw 74 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!test_bit(cbit, rcfw->cmdq_bitmap)) rcfw 78 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_service_creq((unsigned long)rcfw); rcfw 79 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c } while (test_bit(cbit, rcfw->cmdq_bitmap) && --count); rcfw 84 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, rcfw 88 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_hwq *cmdq = &rcfw->cmdq; rcfw 89 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c u32 cmdq_depth = rcfw->cmdq_depth; rcfw 98 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!test_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags) && rcfw 102 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 107 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (test_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags) && rcfw 109 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "RCFW already initialized!\n"); rcfw 113 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (test_bit(FIRMWARE_TIMED_OUT, &rcfw->flags)) rcfw 121 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "RCFW: CMDQ is full!\n"); rcfw 127 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c cookie = rcfw->seq_num & RCFW_MAX_COOKIE_VALUE; rcfw 128 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c cbit = cookie % rcfw->cmdq_depth; rcfw 132 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c set_bit(cbit, rcfw->cmdq_bitmap); rcfw 134 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c crsqe = &rcfw->crsqe_tbl[cbit]; rcfw 166 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 176 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->seq_num++; rcfw 179 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->seq_num++; rcfw 182 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (test_bit(FIRMWARE_FIRST_FLAG, &rcfw->flags)) { rcfw 189 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c clear_bit(FIRMWARE_FIRST_FLAG, &rcfw->flags); rcfw 194 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c writel(cmdq_prod, rcfw->cmdq_bar_reg_iomem + rcfw 195 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_prod_off); rcfw 196 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c writel(RCFW_CMDQ_TRIG_VAL, rcfw->cmdq_bar_reg_iomem + rcfw 197 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_trig_off); rcfw 204 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, rcfw 216 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = __send_message(rcfw, req, resp, sb, is_block); rcfw 223 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x send failed\n", rcfw 232 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = __block_for_resp(rcfw, cookie); rcfw 234 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = __wait_for_resp(rcfw, cookie); rcfw 237 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x timedout (%d)msec\n", rcfw 239 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c set_bit(FIRMWARE_TIMED_OUT, &rcfw->flags); rcfw 245 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x status %#x\n", rcfw 253 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c static int bnxt_qplib_process_func_event(struct bnxt_qplib_rcfw *rcfw, rcfw 292 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw, rcfw 295 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_hwq *cmdq = &rcfw->cmdq; rcfw 309 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c qp = rcfw->qp_tbl[qp_id].qp_handle; rcfw 310 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_dbg(&rcfw->pdev->dev, rcfw 312 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_dbg(&rcfw->pdev->dev, rcfw 319 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->aeq_handler(rcfw, qp_event, qp); rcfw 337 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c cbit = cookie % rcfw->cmdq_depth; rcfw 338 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c crsqe = &rcfw->crsqe_tbl[cbit]; rcfw 345 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 351 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!test_and_clear_bit(cbit, rcfw->cmdq_bitmap)) rcfw 352 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_warn(&rcfw->pdev->dev, rcfw 358 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c wake_up(&rcfw->waitq); rcfw 367 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_rcfw *rcfw = (struct bnxt_qplib_rcfw *)data; rcfw 368 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bool gen_p5 = bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx); rcfw 369 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_hwq *creq = &rcfw->creq; rcfw 393 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c (rcfw, (struct creq_qp_event *)creqe); rcfw 394 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_qp_event_processed++; rcfw 398 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c (rcfw, (struct creq_func_event *)creqe)) rcfw 399 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_func_event_processed++; rcfw 401 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_warn(&rcfw->pdev->dev, rcfw 406 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_warn(&rcfw->pdev->dev, rcfw 417 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_ring_creq_db_rearm(rcfw->creq_bar_reg_iomem, rcfw 419 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_ring_id, gen_p5); rcfw 426 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_rcfw *rcfw = dev_instance; rcfw 427 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_hwq *creq = &rcfw->creq; rcfw 433 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c creq_ptr = (struct creq_base **)rcfw->creq.pbl_ptr; rcfw 436 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c tasklet_schedule(&rcfw->worker); rcfw 442 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c int bnxt_qplib_deinit_rcfw(struct bnxt_qplib_rcfw *rcfw) rcfw 450 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 455 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c clear_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags); rcfw 476 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c int bnxt_qplib_init_rcfw(struct bnxt_qplib_rcfw *rcfw, rcfw 497 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (is_virtfn || bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx)) rcfw 551 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 555 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c set_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags); rcfw 559 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c void bnxt_qplib_free_rcfw_channel(struct bnxt_qplib_rcfw *rcfw) rcfw 561 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c kfree(rcfw->qp_tbl); rcfw 562 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c kfree(rcfw->crsqe_tbl); rcfw 563 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_free_hwq(rcfw->pdev, &rcfw->cmdq); rcfw 564 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_free_hwq(rcfw->pdev, &rcfw->creq); rcfw 565 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->pdev = NULL; rcfw 569 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_rcfw *rcfw, rcfw 575 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->pdev = pdev; rcfw 576 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq.max_elements = BNXT_QPLIB_CREQE_MAX_CNT; rcfw 577 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c hwq_type = bnxt_qplib_get_hwq_type(rcfw->res); rcfw 578 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (bnxt_qplib_alloc_init_hwq(rcfw->pdev, &rcfw->creq, NULL, rcfw 579 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c &rcfw->creq.max_elements, rcfw 582 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 587 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_256; rcfw 589 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_8192; rcfw 591 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq.max_elements = rcfw->cmdq_depth; rcfw 593 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c (rcfw->pdev, &rcfw->cmdq, NULL, rcfw 594 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c &rcfw->cmdq.max_elements, rcfw 596 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_cmdqe_page_size(rcfw->cmdq_depth), rcfw 598 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 603 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->crsqe_tbl = kcalloc(rcfw->cmdq.max_elements, rcfw 604 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c sizeof(*rcfw->crsqe_tbl), GFP_KERNEL); rcfw 605 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!rcfw->crsqe_tbl) rcfw 608 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->qp_tbl_size = qp_tbl_sz; rcfw 609 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->qp_tbl = kcalloc(qp_tbl_sz, sizeof(struct bnxt_qplib_qp_node), rcfw 611 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!rcfw->qp_tbl) rcfw 617 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_free_rcfw_channel(rcfw); rcfw 621 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c void bnxt_qplib_rcfw_stop_irq(struct bnxt_qplib_rcfw *rcfw, bool kill) rcfw 623 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bool gen_p5 = bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx); rcfw 625 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c tasklet_disable(&rcfw->worker); rcfw 627 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_ring_creq_db(rcfw->creq_bar_reg_iomem, rcfw->creq.cons, rcfw 628 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq.max_elements, rcfw->creq_ring_id, rcfw 631 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c synchronize_irq(rcfw->vector); rcfw 633 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c tasklet_kill(&rcfw->worker); rcfw 635 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (rcfw->requested) { rcfw 636 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c free_irq(rcfw->vector, rcfw); rcfw 637 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->requested = false; rcfw 641 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw) rcfw 645 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_rcfw_stop_irq(rcfw, true); rcfw 647 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c iounmap(rcfw->cmdq_bar_reg_iomem); rcfw 648 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c iounmap(rcfw->creq_bar_reg_iomem); rcfw 650 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c indx = find_first_bit(rcfw->cmdq_bitmap, rcfw->bmap_size); rcfw 651 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (indx != rcfw->bmap_size) rcfw 652 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 654 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c kfree(rcfw->cmdq_bitmap); rcfw 655 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->bmap_size = 0; rcfw 657 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_iomem = NULL; rcfw 658 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_bar_reg_iomem = NULL; rcfw 659 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->aeq_handler = NULL; rcfw 660 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->vector = 0; rcfw 663 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector, rcfw 666 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bool gen_p5 = bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx); rcfw 669 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (rcfw->requested) rcfw 672 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->vector = msix_vector; rcfw 674 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c tasklet_init(&rcfw->worker, rcfw 675 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_service_creq, (unsigned long)rcfw); rcfw 677 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c tasklet_enable(&rcfw->worker); rcfw 678 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = request_irq(rcfw->vector, bnxt_qplib_creq_irq, 0, rcfw 679 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c "bnxt_qplib_creq", rcfw); rcfw 682 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->requested = true; rcfw 683 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_ring_creq_db_rearm(rcfw->creq_bar_reg_iomem, rcfw 684 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq.cons, rcfw->creq.max_elements, rcfw 685 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_ring_id, gen_p5); rcfw 691 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_rcfw *rcfw, rcfw 703 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->seq_num = 0; rcfw 704 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c set_bit(FIRMWARE_FIRST_FLAG, &rcfw->flags); rcfw 705 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bmap_size = BITS_TO_LONGS(rcfw->cmdq_depth) * sizeof(unsigned long); rcfw 706 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bitmap = kzalloc(bmap_size, GFP_KERNEL); rcfw 707 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!rcfw->cmdq_bitmap) rcfw 709 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->bmap_size = bmap_size; rcfw 712 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg = RCFW_COMM_PCI_BAR_REGION; rcfw 713 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c res_base = pci_resource_start(pdev, rcfw->cmdq_bar_reg); rcfw 717 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_iomem = ioremap_nocache(res_base + rcfw 720 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!rcfw->cmdq_bar_reg_iomem) { rcfw 721 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "CMDQ BAR region %d mapping failed\n", rcfw 722 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg); rcfw 726 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_prod_off = virt_fn ? RCFW_VF_COMM_PROD_OFFSET : rcfw 729 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_trig_off = RCFW_COMM_TRIG_OFFSET; rcfw 732 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_bar_reg = RCFW_COMM_CONS_PCI_BAR_REGION; rcfw 733 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c res_base = pci_resource_start(pdev, rcfw->creq_bar_reg); rcfw 735 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 737 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_bar_reg); rcfw 739 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_bar_reg_iomem = ioremap_nocache(res_base + cp_bar_reg_off, rcfw 741 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c if (!rcfw->creq_bar_reg_iomem) { rcfw 742 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, "CREQ BAR region %d mapping failed\n", rcfw 743 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_bar_reg); rcfw 744 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c iounmap(rcfw->cmdq_bar_reg_iomem); rcfw 745 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->cmdq_bar_reg_iomem = NULL; rcfw 748 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_qp_event_processed = 0; rcfw 749 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->creq_func_event_processed = 0; rcfw 752 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rcfw->aeq_handler = aeq_handler; rcfw 753 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c init_waitqueue_head(&rcfw->waitq); rcfw 755 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c rc = bnxt_qplib_rcfw_start_irq(rcfw, msix_vector, true); rcfw 757 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dev_err(&rcfw->pdev->dev, rcfw 759 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c bnxt_qplib_disable_rcfw_channel(rcfw); rcfw 763 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c init.cmdq_pbl = cpu_to_le64(rcfw->cmdq.pbl[PBL_LVL_0].pg_map_arr[0]); rcfw 765 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c ((rcfw->cmdq_depth << CMDQ_INIT_CMDQ_SIZE_SFT) & rcfw 767 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c ((rcfw->cmdq.level << CMDQ_INIT_CMDQ_LVL_SFT) & rcfw 769 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c init.creq_ring_id = cpu_to_le16(rcfw->creq_ring_id); rcfw 772 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c __iowrite32_copy(rcfw->cmdq_bar_reg_iomem, &init, sizeof(init) / 4); rcfw 777 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c struct bnxt_qplib_rcfw *rcfw, rcfw 787 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c sbuf->sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf->size, rcfw 798 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c void bnxt_qplib_rcfw_free_sbuf(struct bnxt_qplib_rcfw *rcfw, rcfw 802 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c dma_free_coherent(&rcfw->pdev->dev, sbuf->size, rcfw 270 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h void bnxt_qplib_free_rcfw_channel(struct bnxt_qplib_rcfw *rcfw); rcfw 272 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h struct bnxt_qplib_rcfw *rcfw, rcfw 275 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h void bnxt_qplib_rcfw_stop_irq(struct bnxt_qplib_rcfw *rcfw, bool kill); rcfw 276 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw); rcfw 277 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector, rcfw 280 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h struct bnxt_qplib_rcfw *rcfw, rcfw 287 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h struct bnxt_qplib_rcfw *rcfw, rcfw 289 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h void bnxt_qplib_rcfw_free_sbuf(struct bnxt_qplib_rcfw *rcfw, rcfw 291 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, rcfw 295 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h int bnxt_qplib_deinit_rcfw(struct bnxt_qplib_rcfw *rcfw); rcfw 296 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h int bnxt_qplib_init_rcfw(struct bnxt_qplib_rcfw *rcfw, rcfw 198 drivers/infiniband/hw/bnxt_re/qplib_res.h struct bnxt_qplib_rcfw *rcfw; rcfw 57 drivers/infiniband/hw/bnxt_re/qplib_sp.c static void bnxt_qplib_query_version(struct bnxt_qplib_rcfw *rcfw, rcfw 67 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 77 drivers/infiniband/hw/bnxt_re/qplib_sp.c int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, rcfw 91 drivers/infiniband/hw/bnxt_re/qplib_sp.c sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); rcfw 93 drivers/infiniband/hw/bnxt_re/qplib_sp.c dev_err(&rcfw->pdev->dev, rcfw 100 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 122 drivers/infiniband/hw/bnxt_re/qplib_sp.c attr->max_qp_sges = bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx) ? rcfw 157 drivers/infiniband/hw/bnxt_re/qplib_sp.c bnxt_qplib_query_version(rcfw, attr->fw_ver); rcfw 170 drivers/infiniband/hw/bnxt_re/qplib_sp.c bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); rcfw 175 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw, rcfw 196 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 226 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 261 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 287 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 349 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 378 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 403 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 499 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 530 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 542 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 552 drivers/infiniband/hw/bnxt_re/qplib_sp.c bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, NULL, rcfw 559 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 581 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 595 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 614 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 631 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 640 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 658 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 728 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, rcfw 775 drivers/infiniband/hw/bnxt_re/qplib_sp.c struct bnxt_qplib_rcfw *rcfw = res->rcfw; rcfw 784 drivers/infiniband/hw/bnxt_re/qplib_sp.c return bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 788 drivers/infiniband/hw/bnxt_re/qplib_sp.c int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw, rcfw 800 drivers/infiniband/hw/bnxt_re/qplib_sp.c sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); rcfw 802 drivers/infiniband/hw/bnxt_re/qplib_sp.c dev_err(&rcfw->pdev->dev, rcfw 809 drivers/infiniband/hw/bnxt_re/qplib_sp.c rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, rcfw 853 drivers/infiniband/hw/bnxt_re/qplib_sp.c if (!rcfw->init_oos_stats) { rcfw 854 drivers/infiniband/hw/bnxt_re/qplib_sp.c rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); rcfw 855 drivers/infiniband/hw/bnxt_re/qplib_sp.c rcfw->init_oos_stats = 1; rcfw 859 drivers/infiniband/hw/bnxt_re/qplib_sp.c rcfw->oos_prev) & BNXT_QPLIB_OOS_COUNT_MASK; rcfw 860 drivers/infiniband/hw/bnxt_re/qplib_sp.c rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); rcfw 864 drivers/infiniband/hw/bnxt_re/qplib_sp.c bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); rcfw 244 drivers/infiniband/hw/bnxt_re/qplib_sp.h int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, rcfw 247 drivers/infiniband/hw/bnxt_re/qplib_sp.h struct bnxt_qplib_rcfw *rcfw, rcfw 267 drivers/infiniband/hw/bnxt_re/qplib_sp.h int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw,