Lines Matching refs:rc
351 int rc;
360 rc = ENOMEM;
368 rc = ENOMEM;
371 rc = iflib_dma_alloc(ctx, sizeof(struct ctx_hw_stats) * ntxqsets,
373 if (rc)
407 return rc;
414 return rc;
446 int rc;
455 rc = ENOMEM;
463 rc = ENOMEM;
471 rc = ENOMEM;
479 rc = ENOMEM;
483 rc = iflib_dma_alloc(ctx, sizeof(struct ctx_hw_stats) * nrxqsets,
485 if (rc)
497 rc = iflib_dma_alloc(ctx, sizeof(struct rx_port_stats) + BNXT_PORT_STAT_PADDING,
499 if (rc)
505 rc = iflib_dma_alloc(ctx, sizeof(struct tx_port_stats) + BNXT_PORT_STAT_PADDING,
508 if (rc)
548 rc = -ENOMEM;
592 rc = iflib_dma_alloc(ctx, BNXT_MAX_MC_ADDRS * ETHER_ADDR_LEN,
594 if (rc)
598 rc = iflib_dma_alloc(ctx, HW_HASH_KEY_SIZE,
600 if (rc)
609 rc = iflib_dma_alloc(ctx, HW_HASH_INDEX_SIZE * sizeof(uint16_t),
611 if (rc)
620 return rc;
644 return rc;
656 int rc;
658 rc = iflib_dma_alloc(softc->ctx, softc->hwrm_max_req_len,
661 return rc;
670 int rc = 0;
710 rc = bnxt_alloc_hwrm_dma_mem(softc);
711 if (rc)
718 rc = ENOMEM;
728 rc = bnxt_hwrm_ver_get(softc);
729 if (rc) {
735 rc = bnxt_alloc_hwrm_short_cmd_req(softc);
736 if (rc)
745 rc = ENOMEM;
751 rc = bnxt_hwrm_nvm_get_dev_info(softc, &softc->nvm_info->mfg_id,
758 rc = bnxt_hwrm_func_drv_rgtr(softc);
759 if (rc) {
764 rc = bnxt_hwrm_func_rgtr_async_events(softc, NULL, 0);
765 if (rc) {
771 rc = bnxt_hwrm_func_qcaps(softc);
772 if (rc)
776 rc = bnxt_hwrm_func_qcfg(softc);
777 if (rc) {
802 rc = bnxt_hwrm_queue_qportcfg(softc);
803 if (rc) {
811 rc = bnxt_hwrm_func_reset(softc);
813 if (rc)
877 rc = iflib_dma_alloc(ctx,
885 rc = bnxt_init_sysctl_ctx(softc);
886 if (rc)
889 rc = bnxt_create_nvram_sysctls(softc->nvm_info);
890 if (rc)
902 rc = bnxt_create_config_sysctls_pre(softc);
903 if (rc)
906 rc = bnxt_create_hw_lro_sysctls(softc);
907 if (rc)
910 rc = bnxt_create_pause_fc_sysctls(softc);
911 if (rc)
918 return (rc);
938 return (rc);
946 int rc;
951 rc = bnxt_probe_phy(softc);
952 if (rc)
964 return rc;
1018 int rc;
1020 rc = bnxt_hwrm_func_reset(softc);
1021 if (rc)
1029 rc = bnxt_hwrm_ring_alloc(softc,
1034 if (rc)
1038 rc = bnxt_cfg_async_cr(softc);
1039 if (rc)
1044 rc = bnxt_hwrm_stat_ctx_alloc(softc, &softc->rx_cp_rings[i],
1047 if (rc)
1055 rc = bnxt_hwrm_ring_alloc(softc,
1059 if (rc)
1063 rc = bnxt_hwrm_ring_alloc(softc,
1067 if (rc)
1074 rc = bnxt_hwrm_ring_alloc(softc,
1078 if (rc)
1091 rc = bnxt_hwrm_ring_grp_alloc(softc, &softc->grp_info[i]);
1092 if (rc)
1097 rc = bnxt_hwrm_vnic_ctx_alloc(softc, &softc->vnic_info.rss_id);
1098 if (rc)
1104 rc = bnxt_hwrm_vnic_alloc(softc, &softc->vnic_info);
1105 if (rc)
1107 rc = bnxt_hwrm_vnic_cfg(softc, &softc->vnic_info);
1108 if (rc)
1110 rc = bnxt_hwrm_set_filter(softc, &softc->vnic_info);
1111 if (rc)
1123 rc = bnxt_hwrm_rss_cfg(softc, &softc->vnic_info,
1125 if (rc)
1128 rc = bnxt_hwrm_vnic_tpa_cfg(softc);
1129 if (rc)
1134 rc = bnxt_hwrm_stat_ctx_alloc(softc, &softc->tx_cp_rings[i],
1137 if (rc)
1144 rc = bnxt_hwrm_ring_alloc(softc,
1148 if (rc)
1152 rc = bnxt_hwrm_ring_alloc(softc,
1156 if (rc)
1291 int rc;
1367 rc = bnxt_hwrm_set_link_setting(softc, true, true, true);
1369 return rc;
1377 int rc;
1396 rc = bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info);
1398 return rc;
1519 int rc;
1523 rc = iflib_irq_alloc_generic(ctx, &softc->def_cp_ring.irq,
1526 if (rc) {
1529 return rc;
1534 rc = iflib_irq_alloc_generic(ctx, &softc->rx_cp_rings[i].irq,
1537 if (rc) {
1548 return rc;
1554 return rc;
1650 int rc = ENOTSUP;
1655 if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0)
1663 if ((rc = copyin(ioh, iod, iol)) != 0)
1672 rc = bnxt_hwrm_nvm_find_dir_entry(softc, find->type,
1677 if (rc) {
1678 iod->hdr.rc = rc;
1679 copyout(&iod->hdr.rc, &ioh->rc,
1680 sizeof(ioh->rc));
1683 iod->hdr.rc = 0;
1687 rc = 0;
1701 rc = iflib_dma_alloc(softc->ctx,
1703 if (rc)
1708 rc = bnxt_hwrm_nvm_read(softc, rd->index,
1710 if (rc) {
1711 iod->hdr.rc = rc;
1712 copyout(&iod->hdr.rc, &ioh->rc,
1713 sizeof(ioh->rc));
1719 iod->hdr.rc = 0;
1723 if (iod->hdr.rc == 0)
1727 rc = 0;
1735 rc = bnxt_hwrm_fw_reset(softc, rst->processor,
1737 if (rc) {
1738 iod->hdr.rc = rc;
1739 copyout(&iod->hdr.rc, &ioh->rc,
1740 sizeof(ioh->rc));
1743 iod->hdr.rc = 0;
1747 rc = 0;
1755 rc = bnxt_hwrm_fw_qstatus(softc, qstat->processor,
1757 if (rc) {
1758 iod->hdr.rc = rc;
1759 copyout(&iod->hdr.rc, &ioh->rc,
1760 sizeof(ioh->rc));
1763 iod->hdr.rc = 0;
1767 rc = 0;
1775 rc = bnxt_hwrm_nvm_write(softc, wr->data, true,
1779 if (rc) {
1780 iod->hdr.rc = rc;
1781 copyout(&iod->hdr.rc, &ioh->rc,
1782 sizeof(ioh->rc));
1785 iod->hdr.rc = 0;
1789 rc = 0;
1797 rc = bnxt_hwrm_nvm_erase_dir_entry(softc, erase->index);
1798 if (rc) {
1799 iod->hdr.rc = rc;
1800 copyout(&iod->hdr.rc, &ioh->rc,
1801 sizeof(ioh->rc));
1804 iod->hdr.rc = 0;
1808 rc = 0;
1816 rc = bnxt_hwrm_nvm_get_dir_info(softc, &info->entries,
1818 if (rc) {
1819 iod->hdr.rc = rc;
1820 copyout(&iod->hdr.rc, &ioh->rc,
1821 sizeof(ioh->rc));
1824 iod->hdr.rc = 0;
1828 rc = 0;
1837 rc = iflib_dma_alloc(softc->ctx, get->max_size,
1839 if (rc)
1841 rc = bnxt_hwrm_nvm_get_dir_entries(softc, &get->entries,
1843 if (rc) {
1844 iod->hdr.rc = rc;
1845 copyout(&iod->hdr.rc, &ioh->rc,
1846 sizeof(ioh->rc));
1851 iod->hdr.rc = 0;
1856 rc = 0;
1864 rc = bnxt_hwrm_nvm_verify_update(softc, vrfy->type,
1866 if (rc) {
1867 iod->hdr.rc = rc;
1868 copyout(&iod->hdr.rc, &ioh->rc,
1869 sizeof(ioh->rc));
1872 iod->hdr.rc = 0;
1876 rc = 0;
1884 rc = bnxt_hwrm_nvm_install_update(softc,
1888 if (rc) {
1889 iod->hdr.rc = rc;
1890 copyout(&iod->hdr.rc, &ioh->rc,
1891 sizeof(ioh->rc));
1894 iod->hdr.rc = 0;
1898 rc = 0;
1905 rc = bnxt_hwrm_nvm_modify(softc, mod->index,
1907 if (rc) {
1908 iod->hdr.rc = rc;
1909 copyout(&iod->hdr.rc, &ioh->rc,
1910 sizeof(ioh->rc));
1913 iod->hdr.rc = 0;
1917 rc = 0;
1925 rc = bnxt_hwrm_fw_get_time(softc, >m->year,
1928 if (rc) {
1929 iod->hdr.rc = rc;
1930 copyout(&iod->hdr.rc, &ioh->rc,
1931 sizeof(ioh->rc));
1934 iod->hdr.rc = 0;
1938 rc = 0;
1946 rc = bnxt_hwrm_fw_set_time(softc, stm->year,
1949 if (rc) {
1950 iod->hdr.rc = rc;
1951 copyout(&iod->hdr.rc, &ioh->rc,
1952 sizeof(ioh->rc));
1955 iod->hdr.rc = 0;
1959 rc = 0;
1967 return rc;
1977 int rc = 0;
1979 rc = bnxt_update_link(softc, false);
1980 if (rc) {
1982 "Probe phy can't update link (rc: %x)\n", rc);
1983 return (rc);
1995 return (rc);
2142 int rc;
2144 rc = bnxt_map_bar(softc, &softc->hwrm_bar, 0, true);
2145 if (rc)
2146 return rc;
2148 rc = bnxt_map_bar(softc, &softc->doorbell_bar, 2, false);
2150 return rc;
2172 int rc = 0;
2174 rc = bnxt_hwrm_port_phy_qcfg(softc);
2175 if (rc)
2193 return rc;