Lines Matching refs:rc
38 int rc; in bnxt_dl_flash_update() local
47 rc = bnxt_flash_package_from_fw_obj(bp->dev, params->fw, 0); in bnxt_dl_flash_update()
48 if (!rc) in bnxt_dl_flash_update()
52 return rc; in bnxt_dl_flash_update()
58 int rc; in bnxt_hwrm_remote_dev_reset_set() local
63 rc = hwrm_req_init(bp, req, HWRM_FUNC_CFG); in bnxt_hwrm_remote_dev_reset_set()
64 if (rc) in bnxt_hwrm_remote_dev_reset_set()
65 return rc; in bnxt_hwrm_remote_dev_reset_set()
105 int rc; in bnxt_fw_diagnose() local
116 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "initializing"); in bnxt_fw_diagnose()
117 if (rc) in bnxt_fw_diagnose()
127 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "error"); in bnxt_fw_diagnose()
128 if (rc) in bnxt_fw_diagnose()
130 rc = devlink_fmsg_u32_pair_put(fmsg, "Syndrome", fw_status); in bnxt_fw_diagnose()
131 if (rc) in bnxt_fw_diagnose()
134 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "healthy"); in bnxt_fw_diagnose()
135 if (rc) in bnxt_fw_diagnose()
139 rc = devlink_fmsg_string_pair_put(fmsg, "Severity", in bnxt_fw_diagnose()
141 if (rc) in bnxt_fw_diagnose()
145 rc = devlink_fmsg_string_pair_put(fmsg, "Remedy", in bnxt_fw_diagnose()
147 if (rc) in bnxt_fw_diagnose()
150 rc = devlink_fmsg_string_pair_put(fmsg, "Impact", in bnxt_fw_diagnose()
152 if (rc) in bnxt_fw_diagnose()
159 if (rc || !h->resets_reliable) in bnxt_fw_diagnose()
160 return rc; in bnxt_fw_diagnose()
163 rc = devlink_fmsg_u32_pair_put(fmsg, "Resets", fw_resets); in bnxt_fw_diagnose()
164 if (rc) in bnxt_fw_diagnose()
165 return rc; in bnxt_fw_diagnose()
166 rc = devlink_fmsg_u32_pair_put(fmsg, "Arrests", h->arrests); in bnxt_fw_diagnose()
167 if (rc) in bnxt_fw_diagnose()
168 return rc; in bnxt_fw_diagnose()
169 rc = devlink_fmsg_u32_pair_put(fmsg, "Survivals", h->survivals); in bnxt_fw_diagnose()
170 if (rc) in bnxt_fw_diagnose()
171 return rc; in bnxt_fw_diagnose()
172 rc = devlink_fmsg_u32_pair_put(fmsg, "Discoveries", h->discoveries); in bnxt_fw_diagnose()
173 if (rc) in bnxt_fw_diagnose()
174 return rc; in bnxt_fw_diagnose()
175 rc = devlink_fmsg_u32_pair_put(fmsg, "Fatalities", h->fatalities); in bnxt_fw_diagnose()
176 if (rc) in bnxt_fw_diagnose()
177 return rc; in bnxt_fw_diagnose()
188 int rc; in bnxt_fw_dump() local
202 rc = bnxt_get_coredump(bp, BNXT_DUMP_LIVE, data, &dump_len); in bnxt_fw_dump()
203 if (!rc) { in bnxt_fw_dump()
204 rc = devlink_fmsg_pair_nest_start(fmsg, "core"); in bnxt_fw_dump()
205 if (rc) in bnxt_fw_dump()
207 rc = devlink_fmsg_binary_pair_put(fmsg, "data", data, dump_len); in bnxt_fw_dump()
208 if (rc) in bnxt_fw_dump()
210 rc = devlink_fmsg_u32_pair_put(fmsg, "size", dump_len); in bnxt_fw_dump()
211 if (rc) in bnxt_fw_dump()
213 rc = devlink_fmsg_pair_nest_end(fmsg); in bnxt_fw_dump()
218 return rc; in bnxt_fw_dump()
280 int rc; in bnxt_devlink_health_fw_report() local
294 rc = devlink_health_report(fw_health->fw_reporter, "FW error reported", in bnxt_devlink_health_fw_report()
296 if (rc == -ECANCELED) in bnxt_devlink_health_fw_report()
379 int rc; in bnxt_dl_livepatch_activate() local
386 rc = hwrm_req_init(bp, query_req, HWRM_FW_LIVEPATCH_QUERY); in bnxt_dl_livepatch_activate()
387 if (rc) in bnxt_dl_livepatch_activate()
388 return rc; in bnxt_dl_livepatch_activate()
391 rc = hwrm_req_init(bp, patch_req, HWRM_FW_LIVEPATCH); in bnxt_dl_livepatch_activate()
392 if (rc) { in bnxt_dl_livepatch_activate()
394 return rc; in bnxt_dl_livepatch_activate()
402 rc = hwrm_req_send(bp, query_req); in bnxt_dl_livepatch_activate()
403 if (rc) { in bnxt_dl_livepatch_activate()
417 rc = hwrm_req_send(bp, patch_req); in bnxt_dl_livepatch_activate()
418 if (rc) { in bnxt_dl_livepatch_activate()
425 if (!rc && !installed) { in bnxt_dl_livepatch_activate()
427 rc = -ENOENT; in bnxt_dl_livepatch_activate()
431 return rc; in bnxt_dl_livepatch_activate()
440 int rc = 0; in bnxt_dl_reload_down() local
457 rc = bnxt_close_nic(bp, true, true); in bnxt_dl_reload_down()
458 if (rc) { in bnxt_dl_reload_down()
466 rc = bnxt_hwrm_func_drv_unrgtr(bp); in bnxt_dl_reload_down()
467 if (rc) { in bnxt_dl_reload_down()
499 rc = bnxt_hwrm_firmware_reset(bp->dev, in bnxt_dl_reload_down()
504 if (rc) { in bnxt_dl_reload_down()
512 rc = -EOPNOTSUPP; in bnxt_dl_reload_down()
515 return rc; in bnxt_dl_reload_down()
523 int rc = 0; in bnxt_dl_reload_up() local
531 rc = bnxt_open_nic(bp, true, true); in bnxt_dl_reload_up()
532 bnxt_ulp_start(bp, rc); in bnxt_dl_reload_up()
533 if (!rc) { in bnxt_dl_reload_up()
554 rc = -ETIMEDOUT; in bnxt_dl_reload_up()
559 rc = -ENODEV; in bnxt_dl_reload_up()
565 if (!rc) in bnxt_dl_reload_up()
574 if (!rc) { in bnxt_dl_reload_up()
586 return rc; in bnxt_dl_reload_up()
674 int rc, i = 2; in bnxt_hwrm_get_nvm_cfg_ver() local
677 rc = hwrm_req_init(bp, req, HWRM_NVM_GET_VARIABLE); in bnxt_hwrm_get_nvm_cfg_ver()
678 if (rc) in bnxt_hwrm_get_nvm_cfg_ver()
679 return rc; in bnxt_hwrm_get_nvm_cfg_ver()
683 rc = -ENOMEM; in bnxt_hwrm_get_nvm_cfg_ver()
703 rc = hwrm_req_send_silent(bp, req); in bnxt_hwrm_get_nvm_cfg_ver()
704 if (rc) in bnxt_hwrm_get_nvm_cfg_ver()
718 return rc; in bnxt_hwrm_get_nvm_cfg_ver()
754 int rc; in bnxt_dl_livepatch_info_put() local
759 rc = hwrm_req_init(bp, query, HWRM_FW_LIVEPATCH_QUERY); in bnxt_dl_livepatch_info_put()
760 if (rc) in bnxt_dl_livepatch_info_put()
761 return rc; in bnxt_dl_livepatch_info_put()
771 rc = hwrm_req_send(bp, query); in bnxt_dl_livepatch_info_put()
772 if (rc) in bnxt_dl_livepatch_info_put()
778 rc = devlink_info_version_running_put(req, key, resp->active_ver); in bnxt_dl_livepatch_info_put()
779 if (rc) in bnxt_dl_livepatch_info_put()
785 rc = devlink_info_version_stored_put(req, key, resp->install_ver); in bnxt_dl_livepatch_info_put()
786 if (rc) in bnxt_dl_livepatch_info_put()
792 return rc; in bnxt_dl_livepatch_info_put()
808 int rc; in bnxt_dl_info_get() local
810 rc = devlink_info_driver_name_put(req, DRV_MODULE_NAME); in bnxt_dl_info_get()
811 if (rc) in bnxt_dl_info_get()
812 return rc; in bnxt_dl_info_get()
818 rc = devlink_info_serial_number_put(req, buf); in bnxt_dl_info_get()
819 if (rc) in bnxt_dl_info_get()
820 return rc; in bnxt_dl_info_get()
824 rc = devlink_info_board_serial_number_put(req, bp->board_serialno); in bnxt_dl_info_get()
825 if (rc) in bnxt_dl_info_get()
826 return rc; in bnxt_dl_info_get()
829 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
832 if (rc) in bnxt_dl_info_get()
833 return rc; in bnxt_dl_info_get()
836 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
838 if (rc) in bnxt_dl_info_get()
839 return rc; in bnxt_dl_info_get()
843 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
845 if (rc) in bnxt_dl_info_get()
846 return rc; in bnxt_dl_info_get()
848 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
851 if (rc) in bnxt_dl_info_get()
852 return rc; in bnxt_dl_info_get()
856 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
858 if (rc) in bnxt_dl_info_get()
859 return rc; in bnxt_dl_info_get()
864 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
867 if (rc) in bnxt_dl_info_get()
868 return rc; in bnxt_dl_info_get()
896 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
898 if (rc) in bnxt_dl_info_get()
899 return rc; in bnxt_dl_info_get()
901 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
904 if (rc) in bnxt_dl_info_get()
905 return rc; in bnxt_dl_info_get()
907 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
909 if (rc) in bnxt_dl_info_get()
910 return rc; in bnxt_dl_info_get()
912 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
914 if (rc) in bnxt_dl_info_get()
915 return rc; in bnxt_dl_info_get()
917 rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); in bnxt_dl_info_get()
918 if (rc || in bnxt_dl_info_get()
929 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
931 if (rc) in bnxt_dl_info_get()
932 return rc; in bnxt_dl_info_get()
937 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
939 if (rc) in bnxt_dl_info_get()
940 return rc; in bnxt_dl_info_get()
945 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
947 if (rc) in bnxt_dl_info_get()
948 return rc; in bnxt_dl_info_get()
953 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
955 if (rc) in bnxt_dl_info_get()
956 return rc; in bnxt_dl_info_get()
958 rc = bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_SRT_PATCH); in bnxt_dl_info_get()
959 if (rc) in bnxt_dl_info_get()
960 return rc; in bnxt_dl_info_get()
973 int idx = 0, rc, i; in bnxt_hwrm_nvm_req() local
1016 rc = hwrm_req_send(bp, msg); in bnxt_hwrm_nvm_req()
1018 rc = hwrm_req_send_silent(bp, msg); in bnxt_hwrm_nvm_req()
1019 if (!rc) { in bnxt_hwrm_nvm_req()
1026 rc = -EOPNOTSUPP; in bnxt_hwrm_nvm_req()
1030 if (rc == -EACCES) in bnxt_hwrm_nvm_req()
1032 return rc; in bnxt_hwrm_nvm_req()
1040 int rc; in bnxt_dl_nvm_param_get() local
1042 rc = hwrm_req_init(bp, req, HWRM_NVM_GET_VARIABLE); in bnxt_dl_nvm_param_get()
1043 if (rc) in bnxt_dl_nvm_param_get()
1044 return rc; in bnxt_dl_nvm_param_get()
1046 rc = bnxt_hwrm_nvm_req(bp, id, req, &ctx->val); in bnxt_dl_nvm_param_get()
1047 if (!rc && id == BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK) in bnxt_dl_nvm_param_get()
1050 return rc; in bnxt_dl_nvm_param_get()
1058 int rc; in bnxt_dl_nvm_param_set() local
1060 rc = hwrm_req_init(bp, req, HWRM_NVM_SET_VARIABLE); in bnxt_dl_nvm_param_set()
1061 if (rc) in bnxt_dl_nvm_param_set()
1062 return rc; in bnxt_dl_nvm_param_set()
1106 int rc; in bnxt_remote_dev_reset_set() local
1108 rc = bnxt_hwrm_remote_dev_reset_set(bp, ctx->val.vbool); in bnxt_remote_dev_reset_set()
1109 if (rc) in bnxt_remote_dev_reset_set()
1110 return rc; in bnxt_remote_dev_reset_set()
1113 return rc; in bnxt_remote_dev_reset_set()
1148 int rc; in bnxt_dl_params_register() local
1156 rc = devlink_params_register(bp->dl, bnxt_dl_params, num_params); in bnxt_dl_params_register()
1157 if (rc) in bnxt_dl_params_register()
1159 rc); in bnxt_dl_params_register()
1160 return rc; in bnxt_dl_params_register()
1182 int rc; in bnxt_dl_register() local
1213 rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); in bnxt_dl_register()
1214 if (rc) { in bnxt_dl_register()
1219 rc = bnxt_dl_params_register(bp); in bnxt_dl_register()
1220 if (rc) in bnxt_dl_register()
1231 return rc; in bnxt_dl_register()