Lines Matching refs:status

194 static int ocrdma_get_mbx_errno(u32 status)  in ocrdma_get_mbx_errno()  argument
197 u8 mbox_status = (status & OCRDMA_MBX_RSP_STATUS_MASK) >> in ocrdma_get_mbx_errno()
199 u8 add_status = (status & OCRDMA_MBX_RSP_ASTATUS_MASK) >> in ocrdma_get_mbx_errno()
406 int status; in ocrdma_mbx_delete_q() local
426 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_delete_q()
428 if (!status) in ocrdma_mbx_delete_q()
430 return status; in ocrdma_mbx_delete_q()
435 int status; in ocrdma_mbx_create_eq() local
450 status = be_roce_mcc_cmd(dev->nic_info.netdev, cmd, sizeof(*cmd), NULL, in ocrdma_mbx_create_eq()
452 if (!status) { in ocrdma_mbx_create_eq()
457 return status; in ocrdma_mbx_create_eq()
463 int status; in ocrdma_create_eq() local
465 status = ocrdma_alloc_q(dev, &eq->q, OCRDMA_EQ_LEN, in ocrdma_create_eq()
467 if (status) in ocrdma_create_eq()
468 return status; in ocrdma_create_eq()
470 status = ocrdma_mbx_create_eq(dev, eq); in ocrdma_create_eq()
471 if (status) in ocrdma_create_eq()
479 return status; in ocrdma_create_eq()
529 int status; in ocrdma_mbx_mq_cq_create() local
546 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_mq_cq_create()
548 if (!status) { in ocrdma_mbx_mq_cq_create()
552 return status; in ocrdma_mbx_mq_cq_create()
568 int num_pages, status; in ocrdma_mbx_create_mq() local
595 status = be_roce_mcc_cmd(dev->nic_info.netdev, in ocrdma_mbx_create_mq()
597 if (!status) { in ocrdma_mbx_create_mq()
601 return status; in ocrdma_mbx_create_mq()
606 int status; in ocrdma_create_mq() local
609 status = ocrdma_alloc_q(dev, &dev->mq.cq, OCRDMA_MQ_CQ_LEN, in ocrdma_create_mq()
611 if (status) in ocrdma_create_mq()
615 status = ocrdma_mbx_mq_cq_create(dev, &dev->mq.cq, &dev->eq_tbl[0].q); in ocrdma_create_mq()
616 if (status) in ocrdma_create_mq()
624 status = ocrdma_alloc_q(dev, &dev->mq.sq, OCRDMA_MQ_LEN, in ocrdma_create_mq()
626 if (status) in ocrdma_create_mq()
628 status = ocrdma_mbx_create_mq(dev, &dev->mq.sq, &dev->mq.cq); in ocrdma_create_mq()
629 if (status) in ocrdma_create_mq()
641 return status; in ocrdma_create_mq()
868 dev->mqe_ctx.cqe_status = (cqe->status & in ocrdma_process_mcqe()
871 (cqe->status & OCRDMA_MCQE_ESTATUS_MASK) in ocrdma_process_mcqe()
1056 long status; in ocrdma_wait_mqe_cmpl() local
1058 status = wait_event_timeout(dev->mqe_ctx.cmd_wait, in ocrdma_wait_mqe_cmpl()
1061 if (status) in ocrdma_wait_mqe_cmpl()
1074 int status = 0; in ocrdma_mbx_cmd() local
1083 status = ocrdma_wait_mqe_cmpl(dev); in ocrdma_mbx_cmd()
1084 if (status) in ocrdma_mbx_cmd()
1105 status = ocrdma_get_mbx_cqe_errno(cqe_status); in ocrdma_mbx_cmd()
1109 if (rsp && (mqe->u.rsp.status & OCRDMA_MBX_RSP_STATUS_MASK)) in ocrdma_mbx_cmd()
1110 status = ocrdma_get_mbx_errno(mqe->u.rsp.status); in ocrdma_mbx_cmd()
1113 return status; in ocrdma_mbx_cmd()
1119 int status; in ocrdma_nonemb_mbx_cmd() local
1126 status = ocrdma_mbx_cmd(dev, mqe); in ocrdma_nonemb_mbx_cmd()
1127 if (!status) in ocrdma_nonemb_mbx_cmd()
1131 if (rsp->status & OCRDMA_MBX_RSP_STATUS_MASK) in ocrdma_nonemb_mbx_cmd()
1132 status = ocrdma_get_mbx_errno(rsp->status); in ocrdma_nonemb_mbx_cmd()
1134 if (status) in ocrdma_nonemb_mbx_cmd()
1140 return status; in ocrdma_nonemb_mbx_cmd()
1238 int status = -ENOMEM; in ocrdma_mbx_query_fw_ver() local
1249 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_fw_ver()
1250 if (status) in ocrdma_mbx_query_fw_ver()
1259 return status; in ocrdma_mbx_query_fw_ver()
1265 int status = -ENOMEM; in ocrdma_mbx_query_fw_config() local
1275 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_fw_config()
1276 if (status) in ocrdma_mbx_query_fw_config()
1279 status = ocrdma_check_fw_config(dev, rsp); in ocrdma_mbx_query_fw_config()
1282 return status; in ocrdma_mbx_query_fw_config()
1290 int status; in ocrdma_mbx_rdma_stats() local
1316 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); in ocrdma_mbx_rdma_stats()
1317 if (status) in ocrdma_mbx_rdma_stats()
1324 return status; in ocrdma_mbx_rdma_stats()
1329 int status = -ENOMEM; in ocrdma_mbx_get_ctrl_attribs() local
1337 return status; in ocrdma_mbx_get_ctrl_attribs()
1358 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dma.va); in ocrdma_mbx_get_ctrl_attribs()
1359 if (!status) { in ocrdma_mbx_get_ctrl_attribs()
1373 return status; in ocrdma_mbx_get_ctrl_attribs()
1378 int status = -ENOMEM; in ocrdma_mbx_query_dev() local
1384 return status; in ocrdma_mbx_query_dev()
1385 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_dev()
1386 if (status) in ocrdma_mbx_query_dev()
1392 return status; in ocrdma_mbx_query_dev()
1398 int status = -ENOMEM; in ocrdma_mbx_get_link_speed() local
1405 return status; in ocrdma_mbx_get_link_speed()
1412 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_get_link_speed()
1413 if (status) in ocrdma_mbx_get_link_speed()
1425 return status; in ocrdma_mbx_get_link_speed()
1430 int status = -ENOMEM; in ocrdma_mbx_get_phy_info() local
1436 return status; in ocrdma_mbx_get_phy_info()
1442 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_get_phy_info()
1443 if (status) in ocrdma_mbx_get_phy_info()
1459 return status; in ocrdma_mbx_get_phy_info()
1464 int status = -ENOMEM; in ocrdma_mbx_alloc_pd() local
1470 return status; in ocrdma_mbx_alloc_pd()
1473 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd()
1474 if (status) in ocrdma_mbx_alloc_pd()
1488 return status; in ocrdma_mbx_alloc_pd()
1493 int status = -ENOMEM; in ocrdma_mbx_dealloc_pd() local
1498 return status; in ocrdma_mbx_dealloc_pd()
1500 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_dealloc_pd()
1502 return status; in ocrdma_mbx_dealloc_pd()
1508 int status = -ENOMEM; in ocrdma_mbx_alloc_pd_range() local
1521 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd_range()
1524 if (!status && (rsp->dpp_page_pdid & OCRDMA_ALLOC_PD_RSP_DPP) && in ocrdma_mbx_alloc_pd_range()
1544 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_alloc_pd_range()
1546 if (!status && rsp->pd_count) { in ocrdma_mbx_alloc_pd_range()
1561 return status; in ocrdma_mbx_alloc_pd_range()
1597 int status; in ocrdma_alloc_pd_pool() local
1604 status = ocrdma_mbx_alloc_pd_range(dev); in ocrdma_alloc_pd_pool()
1605 if (status) { in ocrdma_alloc_pd_pool()
1646 int status = -ENOMEM; in ocrdma_mbx_create_ah_tbl() local
1656 return status; in ocrdma_mbx_create_ah_tbl()
1700 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_ah_tbl()
1701 if (status) in ocrdma_mbx_create_ah_tbl()
1719 return status; in ocrdma_mbx_create_ah_tbl()
1786 int status = -ENOMEM; int max_hw_cqe; in ocrdma_mbx_create_cq() local
1821 status = -ENOMEM; in ocrdma_mbx_create_cq()
1872 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_cq()
1873 if (status) in ocrdma_mbx_create_cq()
1885 return status; in ocrdma_mbx_create_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; in ocrdma_mbx_dealloc_lkey() local
1952 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_dealloc_lkey()
1955 return status; in ocrdma_mbx_dealloc_lkey()
1961 int status = -ENOMEM; in ocrdma_mbx_reg_mr() local
2000 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_reg_mr()
2001 if (status) in ocrdma_mbx_reg_mr()
2007 return status; in ocrdma_mbx_reg_mr()
2014 int status; in ocrdma_mbx_reg_mr_cont() local
2032 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_reg_mr_cont()
2035 return status; in ocrdma_mbx_reg_mr_cont()
2041 int status; in ocrdma_reg_mr() local
2051 status = ocrdma_mbx_reg_mr(dev, hwmr, pdid, in ocrdma_reg_mr()
2053 if (status) { in ocrdma_reg_mr()
2054 pr_err("%s() status=%d\n", __func__, status); in ocrdma_reg_mr()
2055 return status; in ocrdma_reg_mr()
2071 status = ocrdma_mbx_reg_mr_cont(dev, hwmr, cur_pbl_cnt, in ocrdma_reg_mr()
2073 if (status) in ocrdma_reg_mr()
2076 if (status) in ocrdma_reg_mr()
2077 pr_err("%s() err. status=%d\n", __func__, status); in ocrdma_reg_mr()
2079 return status; in ocrdma_reg_mr()
2185 int status; in ocrdma_set_create_qp_sq_cmd() local
2198 status = ocrdma_build_q_conf(&max_wqe_allocated, in ocrdma_set_create_qp_sq_cmd()
2200 if (status) { in ocrdma_set_create_qp_sq_cmd()
2240 int status; in ocrdma_set_create_qp_rq_cmd() local
2248 status = ocrdma_build_q_conf(&max_rqe_allocated, dev->attr.rqe_size, in ocrdma_set_create_qp_rq_cmd()
2250 if (status) { in ocrdma_set_create_qp_rq_cmd()
2253 return status; in ocrdma_set_create_qp_rq_cmd()
2371 int status = -ENOMEM; in ocrdma_mbx_create_qp() local
2397 return status; in ocrdma_mbx_create_qp()
2400 status = ocrdma_set_create_qp_sq_cmd(cmd, attrs, qp); in ocrdma_mbx_create_qp()
2401 if (status) in ocrdma_mbx_create_qp()
2410 status = ocrdma_set_create_qp_rq_cmd(cmd, attrs, qp); in ocrdma_mbx_create_qp()
2411 if (status) in ocrdma_mbx_create_qp()
2415 status = ocrdma_set_create_qp_ird_cmd(cmd, qp); in ocrdma_mbx_create_qp()
2416 if (status) in ocrdma_mbx_create_qp()
2446 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_qp()
2447 if (status) in ocrdma_mbx_create_qp()
2463 return status; in ocrdma_mbx_create_qp()
2469 int status = -ENOMEM; in ocrdma_mbx_query_qp() local
2475 return status; in ocrdma_mbx_query_qp()
2477 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_qp()
2478 if (status) in ocrdma_mbx_query_qp()
2484 return status; in ocrdma_mbx_query_qp()
2492 int status; in ocrdma_set_av_params() local
2524 status = rdma_read_gid_l2_fields(sgid_attr, &vlan_id, &mac_addr[0]); in ocrdma_set_av_params()
2525 if (status) in ocrdma_set_av_params()
2526 return status; in ocrdma_set_av_params()
2531 status = ocrdma_resolve_dmac(dev, ah_attr, &mac_addr[0]); in ocrdma_set_av_params()
2532 if (status) in ocrdma_set_av_params()
2533 return status; in ocrdma_set_av_params()
2577 int status = 0; in ocrdma_set_qp_params() local
2591 status = ocrdma_set_av_params(qp, cmd, attrs, attr_mask); in ocrdma_set_qp_params()
2592 if (status) in ocrdma_set_qp_params()
2593 return status; in ocrdma_set_qp_params()
2619 status = -EINVAL; in ocrdma_set_qp_params()
2661 status = -EINVAL; in ocrdma_set_qp_params()
2669 status = -EINVAL; in ocrdma_set_qp_params()
2679 return status; in ocrdma_set_qp_params()
2685 int status = -ENOMEM; in ocrdma_mbx_modify_qp() local
2690 return status; in ocrdma_mbx_modify_qp()
2706 status = ocrdma_set_qp_params(qp, cmd, attrs, attr_mask); in ocrdma_mbx_modify_qp()
2707 if (status) in ocrdma_mbx_modify_qp()
2709 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_qp()
2710 if (status) in ocrdma_mbx_modify_qp()
2715 return status; in ocrdma_mbx_modify_qp()
2720 int status = -ENOMEM; in ocrdma_mbx_destroy_qp() local
2726 return status; in ocrdma_mbx_destroy_qp()
2728 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_destroy_qp()
2729 if (status) in ocrdma_mbx_destroy_qp()
2740 return status; in ocrdma_mbx_destroy_qp()
2747 int status = -ENOMEM; in ocrdma_mbx_create_srq() local
2758 return status; in ocrdma_mbx_create_srq()
2762 status = ocrdma_build_q_conf(&max_rqe_allocated, in ocrdma_mbx_create_srq()
2765 if (status) { in ocrdma_mbx_create_srq()
2768 status = -EINVAL; in ocrdma_mbx_create_srq()
2774 status = -ENOMEM; in ocrdma_mbx_create_srq()
2795 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_create_srq()
2796 if (status) in ocrdma_mbx_create_srq()
2815 return status; in ocrdma_mbx_create_srq()
2820 int status = -ENOMEM; in ocrdma_mbx_modify_srq() local
2827 return status; in ocrdma_mbx_modify_srq()
2831 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_srq()
2833 return status; in ocrdma_mbx_modify_srq()
2838 int status = -ENOMEM; in ocrdma_mbx_query_srq() local
2844 return status; in ocrdma_mbx_query_srq()
2846 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_query_srq()
2847 if (status == 0) { in ocrdma_mbx_query_srq()
2859 return status; in ocrdma_mbx_query_srq()
2880 int status; in ocrdma_mbx_get_dcbx_config() local
2894 status = -ENOMEM; in ocrdma_mbx_get_dcbx_config()
2908 status = ocrdma_mbx_cmd(dev, &cmd); in ocrdma_mbx_get_dcbx_config()
2909 if (status) in ocrdma_mbx_get_dcbx_config()
2919 return status; in ocrdma_mbx_get_dcbx_config()
2929 int status = -EINVAL, indx, slindx; in ocrdma_parse_dcbxcfg_rsp() local
2985 status = 0; in ocrdma_parse_dcbxcfg_rsp()
2998 return status; in ocrdma_parse_dcbxcfg_rsp()
3003 int status = 0, indx; in ocrdma_init_service_level() local
3009 status = ocrdma_mbx_get_dcbx_config(dev, ptype, &dcbxcfg); in ocrdma_init_service_level()
3010 if (status) { in ocrdma_init_service_level()
3011 pr_err("%s(): status=%d\n", __func__, status); in ocrdma_init_service_level()
3016 status = ocrdma_parse_dcbxcfg_rsp(dev, ptype, in ocrdma_init_service_level()
3018 if (status) { in ocrdma_init_service_level()
3026 if (status) in ocrdma_init_service_level()
3041 int status = -EINVAL; in ocrdma_alloc_av() local
3052 status = 0; in ocrdma_alloc_av()
3058 status = -EAGAIN; in ocrdma_alloc_av()
3060 return status; in ocrdma_alloc_av()
3073 int num_eq, i, status = 0; in ocrdma_create_eqs() local
3094 status = ocrdma_create_eq(dev, &dev->eq_tbl[i], in ocrdma_create_eqs()
3096 if (status) { in ocrdma_create_eqs()
3097 status = -EINVAL; in ocrdma_create_eqs()
3103 status = request_irq(irq, ocrdma_irq_handler, flags, in ocrdma_create_eqs()
3106 if (status) in ocrdma_create_eqs()
3114 return status; in ocrdma_create_eqs()
3120 int i, status; in ocrdma_mbx_modify_eqd() local
3137 status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); in ocrdma_mbx_modify_eqd()
3140 return status; in ocrdma_mbx_modify_eqd()
3193 int status; in ocrdma_init_hw() local
3196 status = ocrdma_create_eqs(dev); in ocrdma_init_hw()
3197 if (status) in ocrdma_init_hw()
3199 status = ocrdma_create_mq(dev); in ocrdma_init_hw()
3200 if (status) in ocrdma_init_hw()
3202 status = ocrdma_mbx_query_fw_config(dev); in ocrdma_init_hw()
3203 if (status) in ocrdma_init_hw()
3205 status = ocrdma_mbx_query_dev(dev); in ocrdma_init_hw()
3206 if (status) in ocrdma_init_hw()
3208 status = ocrdma_mbx_query_fw_ver(dev); in ocrdma_init_hw()
3209 if (status) in ocrdma_init_hw()
3211 status = ocrdma_mbx_create_ah_tbl(dev); in ocrdma_init_hw()
3212 if (status) in ocrdma_init_hw()
3214 status = ocrdma_mbx_get_phy_info(dev); in ocrdma_init_hw()
3215 if (status) in ocrdma_init_hw()
3217 status = ocrdma_mbx_get_ctrl_attribs(dev); in ocrdma_init_hw()
3218 if (status) in ocrdma_init_hw()
3230 pr_err("%s() status=%d\n", __func__, status); in ocrdma_init_hw()
3231 return status; in ocrdma_init_hw()