Lines Matching refs:status
193 static int ocrdma_get_mbx_errno(u32 status) in ocrdma_get_mbx_errno() argument
196 u8 mbox_status = (status & OCRDMA_MBX_RSP_STATUS_MASK) >> in ocrdma_get_mbx_errno()
198 u8 add_status = (status & OCRDMA_MBX_RSP_ASTATUS_MASK) >> in ocrdma_get_mbx_errno()
403 int status; in ocrdma_mbx_delete_q() local
423 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_delete_q()
425 if (!status) in ocrdma_mbx_delete_q()
427 return status; in ocrdma_mbx_delete_q()
432 int status; in ocrdma_mbx_create_eq() local
447 status = be_roce_mcc_cmd(dev->nic_info.netdev, cmd, sizeof(*cmd), NULL, in ocrdma_mbx_create_eq()
449 if (!status) { in ocrdma_mbx_create_eq()
454 return status; in ocrdma_mbx_create_eq()
460 int status; in ocrdma_create_eq() local
462 status = ocrdma_alloc_q(dev, &eq->q, OCRDMA_EQ_LEN, in ocrdma_create_eq()
464 if (status) in ocrdma_create_eq()
465 return status; in ocrdma_create_eq()
467 status = ocrdma_mbx_create_eq(dev, eq); in ocrdma_create_eq()
468 if (status) in ocrdma_create_eq()
476 return status; in ocrdma_create_eq()
526 int status; in ocrdma_mbx_mq_cq_create() local
543 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_mq_cq_create()
545 if (!status) { in ocrdma_mbx_mq_cq_create()
549 return status; in ocrdma_mbx_mq_cq_create()
565 int num_pages, status; in ocrdma_mbx_create_mq() local
592 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_create_mq()
594 if (!status) { in ocrdma_mbx_create_mq()
598 return status; in ocrdma_mbx_create_mq()
603 int status; in ocrdma_create_mq() local
606 status = ocrdma_alloc_q(dev, &dev->mq.cq, OCRDMA_MQ_CQ_LEN, in ocrdma_create_mq()
608 if (status) in ocrdma_create_mq()
612 status = ocrdma_mbx_mq_cq_create(dev, &dev->mq.cq, &dev->eq_tbl[0].q); in ocrdma_create_mq()
613 if (status) in ocrdma_create_mq()
621 status = ocrdma_alloc_q(dev, &dev->mq.sq, OCRDMA_MQ_LEN, in ocrdma_create_mq()
623 if (status) in ocrdma_create_mq()
625 status = ocrdma_mbx_create_mq(dev, &dev->mq.sq, &dev->mq.cq); in ocrdma_create_mq()
626 if (status) in ocrdma_create_mq()
638 return status; in ocrdma_create_mq()
865 dev->mqe_ctx.cqe_status = (cqe->status & in ocrdma_process_mcqe()
868 (cqe->status & OCRDMA_MCQE_ESTATUS_MASK) in ocrdma_process_mcqe()
1053 long status; in ocrdma_wait_mqe_cmpl() local
1055 status = wait_event_timeout(dev->mqe_ctx.cmd_wait, in ocrdma_wait_mqe_cmpl()
1058 if (status) in ocrdma_wait_mqe_cmpl()
1071 int status = 0; in ocrdma_mbx_cmd() local
1080 status = ocrdma_wait_mqe_cmpl(dev); in ocrdma_mbx_cmd()
1081 if (status) in ocrdma_mbx_cmd()
1102 status = ocrdma_get_mbx_cqe_errno(cqe_status); in ocrdma_mbx_cmd()
1106 if (rsp && (mqe->u.rsp.status & OCRDMA_MBX_RSP_STATUS_MASK)) in ocrdma_mbx_cmd()
1107 status = ocrdma_get_mbx_errno(mqe->u.rsp.status); in ocrdma_mbx_cmd()
1110 return status; in ocrdma_mbx_cmd()
1116 int status = 0; in ocrdma_nonemb_mbx_cmd() local
1123 status = ocrdma_mbx_cmd(dev, mqe); in ocrdma_nonemb_mbx_cmd()
1124 if (!status) in ocrdma_nonemb_mbx_cmd()
1128 if (rsp->status & OCRDMA_MBX_RSP_STATUS_MASK) in ocrdma_nonemb_mbx_cmd()
1129 status = ocrdma_get_mbx_errno(rsp->status); in ocrdma_nonemb_mbx_cmd()
1131 if (status) in ocrdma_nonemb_mbx_cmd()
1137 return status; in ocrdma_nonemb_mbx_cmd()
1233 int status = -ENOMEM; in ocrdma_mbx_query_fw_ver() local
1244 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_fw_ver()
1245 if (status) in ocrdma_mbx_query_fw_ver()
1254 return status; in ocrdma_mbx_query_fw_ver()
1260 int status = -ENOMEM; in ocrdma_mbx_query_fw_config() local
1270 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_fw_config()
1271 if (status) in ocrdma_mbx_query_fw_config()
1274 status = ocrdma_check_fw_config(dev, rsp); in ocrdma_mbx_query_fw_config()
1277 return status; in ocrdma_mbx_query_fw_config()
1285 int status; in ocrdma_mbx_rdma_stats() local
1311 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); in ocrdma_mbx_rdma_stats()
1312 if (status) in ocrdma_mbx_rdma_stats()
1319 return status; in ocrdma_mbx_rdma_stats()
1324 int status = -ENOMEM; in ocrdma_mbx_get_ctrl_attribs() local
1332 return status; in ocrdma_mbx_get_ctrl_attribs()
1354 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dma.va); in ocrdma_mbx_get_ctrl_attribs()
1355 if (!status) { in ocrdma_mbx_get_ctrl_attribs()
1368 return status; in ocrdma_mbx_get_ctrl_attribs()
1373 int status = -ENOMEM; in ocrdma_mbx_query_dev() local
1379 return status; in ocrdma_mbx_query_dev()
1380 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_dev()
1381 if (status) in ocrdma_mbx_query_dev()
1387 return status; in ocrdma_mbx_query_dev()
1393 int status = -ENOMEM; in ocrdma_mbx_get_link_speed() local
1400 return status; in ocrdma_mbx_get_link_speed()
1407 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_get_link_speed()
1408 if (status) in ocrdma_mbx_get_link_speed()
1420 return status; in ocrdma_mbx_get_link_speed()
1425 int status = -ENOMEM; in ocrdma_mbx_get_phy_info() local
1431 return status; in ocrdma_mbx_get_phy_info()
1437 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_get_phy_info()
1438 if (status) in ocrdma_mbx_get_phy_info()
1454 return status; in ocrdma_mbx_get_phy_info()
1459 int status = -ENOMEM; in ocrdma_mbx_alloc_pd() local
1465 return status; in ocrdma_mbx_alloc_pd()
1468 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd()
1469 if (status) in ocrdma_mbx_alloc_pd()
1483 return status; in ocrdma_mbx_alloc_pd()
1488 int status = -ENOMEM; in ocrdma_mbx_dealloc_pd() local
1493 return status; in ocrdma_mbx_dealloc_pd()
1495 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_dealloc_pd()
1497 return status; in ocrdma_mbx_dealloc_pd()
1503 int status = -ENOMEM; in ocrdma_mbx_alloc_pd_range() local
1516 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd_range()
1519 if (!status && (rsp->dpp_page_pdid & OCRDMA_ALLOC_PD_RSP_DPP) && in ocrdma_mbx_alloc_pd_range()
1539 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd_range()
1541 if (!status && rsp->pd_count) { in ocrdma_mbx_alloc_pd_range()
1556 return status; in ocrdma_mbx_alloc_pd_range()
1592 int status; in ocrdma_alloc_pd_pool() local
1600 status = ocrdma_mbx_alloc_pd_range(dev); in ocrdma_alloc_pd_pool()
1601 if (status) { in ocrdma_alloc_pd_pool()
1642 int status = 0; in ocrdma_mbx_create_ah_tbl() local
1652 return status; in ocrdma_mbx_create_ah_tbl()
1697 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_ah_tbl()
1698 if (status) in ocrdma_mbx_create_ah_tbl()
1716 return status; in ocrdma_mbx_create_ah_tbl()
1783 int status = -ENOMEM; int max_hw_cqe; in ocrdma_mbx_create_cq() local
1818 status = -ENOMEM; in ocrdma_mbx_create_cq()
1870 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_cq()
1871 if (status) in ocrdma_mbx_create_cq()
1883 return status; in ocrdma_mbx_create_cq()
1888 int status = -ENOMEM; in ocrdma_mbx_destroy_cq() local
1893 return status; in ocrdma_mbx_destroy_cq()
1901 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_destroy_cq()
1905 return status; in ocrdma_mbx_destroy_cq()
1911 int status = -ENOMEM; in ocrdma_mbx_alloc_lkey() local
1917 return status; in ocrdma_mbx_alloc_lkey()
1932 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_lkey()
1933 if (status) in ocrdma_mbx_alloc_lkey()
1939 return status; in ocrdma_mbx_alloc_lkey()
1944 int status = -ENOMEM; in ocrdma_mbx_dealloc_lkey() local
1952 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_dealloc_lkey()
1953 if (status) in ocrdma_mbx_dealloc_lkey()
1957 return status; in ocrdma_mbx_dealloc_lkey()
1963 int status = -ENOMEM; in ocrdma_mbx_reg_mr() local
2001 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_reg_mr()
2002 if (status) in ocrdma_mbx_reg_mr()
2008 return status; in ocrdma_mbx_reg_mr()
2015 int status = -ENOMEM; in ocrdma_mbx_reg_mr_cont() local
2033 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_reg_mr_cont()
2034 if (status) in ocrdma_mbx_reg_mr_cont()
2038 return status; in ocrdma_mbx_reg_mr_cont()
2044 int status; in ocrdma_reg_mr() local
2054 status = ocrdma_mbx_reg_mr(dev, hwmr, pdid, in ocrdma_reg_mr()
2056 if (status) { in ocrdma_reg_mr()
2057 pr_err("%s() status=%d\n", __func__, status); in ocrdma_reg_mr()
2058 return status; in ocrdma_reg_mr()
2074 status = ocrdma_mbx_reg_mr_cont(dev, hwmr, cur_pbl_cnt, in ocrdma_reg_mr()
2076 if (status) in ocrdma_reg_mr()
2079 if (status) in ocrdma_reg_mr()
2080 pr_err("%s() err. status=%d\n", __func__, status); in ocrdma_reg_mr()
2082 return status; in ocrdma_reg_mr()
2141 int status = 0; in ocrdma_qp_state_change() local
2166 return status; in ocrdma_qp_state_change()
2189 int status; in ocrdma_set_create_qp_sq_cmd() local
2202 status = ocrdma_build_q_conf(&max_wqe_allocated, in ocrdma_set_create_qp_sq_cmd()
2204 if (status) { in ocrdma_set_create_qp_sq_cmd()
2245 int status; in ocrdma_set_create_qp_rq_cmd() local
2253 status = ocrdma_build_q_conf(&max_rqe_allocated, dev->attr.rqe_size, in ocrdma_set_create_qp_rq_cmd()
2255 if (status) { in ocrdma_set_create_qp_rq_cmd()
2258 return status; in ocrdma_set_create_qp_rq_cmd()
2378 int status = -ENOMEM; in ocrdma_mbx_create_qp() local
2404 return status; in ocrdma_mbx_create_qp()
2407 status = ocrdma_set_create_qp_sq_cmd(cmd, attrs, qp); in ocrdma_mbx_create_qp()
2408 if (status) in ocrdma_mbx_create_qp()
2417 status = ocrdma_set_create_qp_rq_cmd(cmd, attrs, qp); in ocrdma_mbx_create_qp()
2418 if (status) in ocrdma_mbx_create_qp()
2422 status = ocrdma_set_create_qp_ird_cmd(cmd, qp); in ocrdma_mbx_create_qp()
2423 if (status) in ocrdma_mbx_create_qp()
2453 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_qp()
2454 if (status) in ocrdma_mbx_create_qp()
2470 return status; in ocrdma_mbx_create_qp()
2476 int status = -ENOMEM; in ocrdma_mbx_query_qp() local
2482 return status; in ocrdma_mbx_query_qp()
2484 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_qp()
2485 if (status) in ocrdma_mbx_query_qp()
2491 return status; in ocrdma_mbx_query_qp()
2499 int status; in ocrdma_set_av_params() local
2522 status = ib_get_cached_gid(&dev->ibdev, 1, ah_attr->grh.sgid_index, in ocrdma_set_av_params()
2524 if (!status && sgid_attr.ndev) { in ocrdma_set_av_params()
2536 status = ocrdma_resolve_dmac(dev, ah_attr, &mac_addr[0]); in ocrdma_set_av_params()
2537 if (status) in ocrdma_set_av_params()
2538 return status; in ocrdma_set_av_params()
2569 int status = 0; in ocrdma_set_qp_params() local
2583 status = ocrdma_set_av_params(qp, cmd, attrs, attr_mask); in ocrdma_set_qp_params()
2584 if (status) in ocrdma_set_qp_params()
2585 return status; in ocrdma_set_qp_params()
2611 status = -EINVAL; in ocrdma_set_qp_params()
2653 status = -EINVAL; in ocrdma_set_qp_params()
2661 status = -EINVAL; in ocrdma_set_qp_params()
2671 return status; in ocrdma_set_qp_params()
2677 int status = -ENOMEM; in ocrdma_mbx_modify_qp() local
2682 return status; in ocrdma_mbx_modify_qp()
2698 status = ocrdma_set_qp_params(qp, cmd, attrs, attr_mask); in ocrdma_mbx_modify_qp()
2699 if (status) in ocrdma_mbx_modify_qp()
2701 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_qp()
2702 if (status) in ocrdma_mbx_modify_qp()
2707 return status; in ocrdma_mbx_modify_qp()
2712 int status = -ENOMEM; in ocrdma_mbx_destroy_qp() local
2718 return status; in ocrdma_mbx_destroy_qp()
2720 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_destroy_qp()
2721 if (status) in ocrdma_mbx_destroy_qp()
2732 return status; in ocrdma_mbx_destroy_qp()
2739 int status = -ENOMEM; in ocrdma_mbx_create_srq() local
2750 return status; in ocrdma_mbx_create_srq()
2754 status = ocrdma_build_q_conf(&max_rqe_allocated, in ocrdma_mbx_create_srq()
2757 if (status) { in ocrdma_mbx_create_srq()
2760 status = -EINVAL; in ocrdma_mbx_create_srq()
2766 status = -ENOMEM; in ocrdma_mbx_create_srq()
2787 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_srq()
2788 if (status) in ocrdma_mbx_create_srq()
2807 return status; in ocrdma_mbx_create_srq()
2812 int status = -ENOMEM; in ocrdma_mbx_modify_srq() local
2819 return status; in ocrdma_mbx_modify_srq()
2823 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_srq()
2825 return status; in ocrdma_mbx_modify_srq()
2830 int status = -ENOMEM; in ocrdma_mbx_query_srq() local
2836 return status; in ocrdma_mbx_query_srq()
2838 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_srq()
2839 if (status == 0) { in ocrdma_mbx_query_srq()
2851 return status; in ocrdma_mbx_query_srq()
2856 int status = -ENOMEM; in ocrdma_mbx_destroy_srq() local
2861 return status; in ocrdma_mbx_destroy_srq()
2863 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_destroy_srq()
2868 return status; in ocrdma_mbx_destroy_srq()
2874 int status = 0; in ocrdma_mbx_get_dcbx_config() local
2888 status = -ENOMEM; in ocrdma_mbx_get_dcbx_config()
2903 status = ocrdma_mbx_cmd(dev, &cmd); in ocrdma_mbx_get_dcbx_config()
2904 if (status) in ocrdma_mbx_get_dcbx_config()
2914 return status; in ocrdma_mbx_get_dcbx_config()
2924 int status = -EINVAL, indx, slindx; in ocrdma_parse_dcbxcfg_rsp() local
2980 status = 0; in ocrdma_parse_dcbxcfg_rsp()
2993 return status; in ocrdma_parse_dcbxcfg_rsp()
2998 int status = 0, indx; in ocrdma_init_service_level() local
3004 status = ocrdma_mbx_get_dcbx_config(dev, ptype, &dcbxcfg); in ocrdma_init_service_level()
3005 if (status) { in ocrdma_init_service_level()
3006 pr_err("%s(): status=%d\n", __func__, status); in ocrdma_init_service_level()
3011 status = ocrdma_parse_dcbxcfg_rsp(dev, ptype, in ocrdma_init_service_level()
3013 if (status) { in ocrdma_init_service_level()
3021 if (status) in ocrdma_init_service_level()
3036 int status = -EINVAL; in ocrdma_alloc_av() local
3047 status = 0; in ocrdma_alloc_av()
3053 status = -EAGAIN; in ocrdma_alloc_av()
3055 return status; in ocrdma_alloc_av()
3069 int num_eq, i, status = 0; in ocrdma_create_eqs() local
3090 status = ocrdma_create_eq(dev, &dev->eq_tbl[i], in ocrdma_create_eqs()
3092 if (status) { in ocrdma_create_eqs()
3093 status = -EINVAL; in ocrdma_create_eqs()
3099 status = request_irq(irq, ocrdma_irq_handler, flags, in ocrdma_create_eqs()
3102 if (status) in ocrdma_create_eqs()
3110 return status; in ocrdma_create_eqs()
3116 int i, status = -ENOMEM; in ocrdma_mbx_modify_eqd() local
3121 return status; in ocrdma_mbx_modify_eqd()
3133 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_eqd()
3134 if (status) in ocrdma_mbx_modify_eqd()
3138 return status; in ocrdma_mbx_modify_eqd()
3163 int i, num = 0, status = -EINVAL; in ocrdma_eqd_set_task() local
3185 status = ocrdma_modify_eqd(dev, &dev->eq_tbl[0], num); in ocrdma_eqd_set_task()
3191 int status; in ocrdma_init_hw() local
3194 status = ocrdma_create_eqs(dev); in ocrdma_init_hw()
3195 if (status) in ocrdma_init_hw()
3197 status = ocrdma_create_mq(dev); in ocrdma_init_hw()
3198 if (status) in ocrdma_init_hw()
3200 status = ocrdma_mbx_query_fw_config(dev); in ocrdma_init_hw()
3201 if (status) in ocrdma_init_hw()
3203 status = ocrdma_mbx_query_dev(dev); in ocrdma_init_hw()
3204 if (status) in ocrdma_init_hw()
3206 status = ocrdma_mbx_query_fw_ver(dev); in ocrdma_init_hw()
3207 if (status) in ocrdma_init_hw()
3209 status = ocrdma_mbx_create_ah_tbl(dev); in ocrdma_init_hw()
3210 if (status) in ocrdma_init_hw()
3212 status = ocrdma_mbx_get_phy_info(dev); in ocrdma_init_hw()
3213 if (status) in ocrdma_init_hw()
3215 status = ocrdma_mbx_get_ctrl_attribs(dev); in ocrdma_init_hw()
3216 if (status) in ocrdma_init_hw()
3228 pr_err("%s() status=%d\n", __func__, status); in ocrdma_init_hw()
3229 return status; in ocrdma_init_hw()