Lines Matching full:rc

40 	int rc;  in bnxt_dl_flash_update()  local
49 rc = bnxt_flash_package_from_fw_obj(bp->dev, params->fw, 0, extack); in bnxt_dl_flash_update()
50 if (!rc) in bnxt_dl_flash_update()
54 return rc; in bnxt_dl_flash_update()
60 int rc; in bnxt_hwrm_remote_dev_reset_set() local
65 rc = hwrm_req_init(bp, req, HWRM_FUNC_CFG); in bnxt_hwrm_remote_dev_reset_set()
66 if (rc) in bnxt_hwrm_remote_dev_reset_set()
67 return rc; in bnxt_hwrm_remote_dev_reset_set()
107 int rc; in bnxt_fw_diagnose() local
118 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "initializing"); in bnxt_fw_diagnose()
119 if (rc) in bnxt_fw_diagnose()
129 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "error"); in bnxt_fw_diagnose()
130 if (rc) in bnxt_fw_diagnose()
132 rc = devlink_fmsg_u32_pair_put(fmsg, "Syndrome", fw_status); in bnxt_fw_diagnose()
133 if (rc) in bnxt_fw_diagnose()
136 rc = devlink_fmsg_string_pair_put(fmsg, "Status", "healthy"); in bnxt_fw_diagnose()
137 if (rc) in bnxt_fw_diagnose()
141 rc = devlink_fmsg_string_pair_put(fmsg, "Severity", in bnxt_fw_diagnose()
143 if (rc) in bnxt_fw_diagnose()
147 rc = devlink_fmsg_string_pair_put(fmsg, "Remedy", in bnxt_fw_diagnose()
149 if (rc) in bnxt_fw_diagnose()
152 rc = devlink_fmsg_string_pair_put(fmsg, "Impact", in bnxt_fw_diagnose()
154 if (rc) in bnxt_fw_diagnose()
161 if (rc || !h->resets_reliable) in bnxt_fw_diagnose()
162 return rc; in bnxt_fw_diagnose()
165 rc = devlink_fmsg_u32_pair_put(fmsg, "Resets", fw_resets); in bnxt_fw_diagnose()
166 if (rc) in bnxt_fw_diagnose()
167 return rc; in bnxt_fw_diagnose()
168 rc = devlink_fmsg_u32_pair_put(fmsg, "Arrests", h->arrests); in bnxt_fw_diagnose()
169 if (rc) in bnxt_fw_diagnose()
170 return rc; in bnxt_fw_diagnose()
171 rc = devlink_fmsg_u32_pair_put(fmsg, "Survivals", h->survivals); in bnxt_fw_diagnose()
172 if (rc) in bnxt_fw_diagnose()
173 return rc; in bnxt_fw_diagnose()
174 rc = devlink_fmsg_u32_pair_put(fmsg, "Discoveries", h->discoveries); in bnxt_fw_diagnose()
175 if (rc) in bnxt_fw_diagnose()
176 return rc; in bnxt_fw_diagnose()
177 rc = devlink_fmsg_u32_pair_put(fmsg, "Fatalities", h->fatalities); in bnxt_fw_diagnose()
178 if (rc) in bnxt_fw_diagnose()
179 return rc; in bnxt_fw_diagnose()
190 int rc; in bnxt_fw_dump() local
204 rc = bnxt_get_coredump(bp, BNXT_DUMP_LIVE, data, &dump_len); in bnxt_fw_dump()
205 if (!rc) { in bnxt_fw_dump()
206 rc = devlink_fmsg_pair_nest_start(fmsg, "core"); in bnxt_fw_dump()
207 if (rc) in bnxt_fw_dump()
209 rc = devlink_fmsg_binary_pair_put(fmsg, "data", data, dump_len); in bnxt_fw_dump()
210 if (rc) in bnxt_fw_dump()
212 rc = devlink_fmsg_u32_pair_put(fmsg, "size", dump_len); in bnxt_fw_dump()
213 if (rc) in bnxt_fw_dump()
215 rc = devlink_fmsg_pair_nest_end(fmsg); in bnxt_fw_dump()
220 return rc; in bnxt_fw_dump()
253 netdev_warn(bp->dev, "Failed to create %s health reporter, rc = %ld\n", in __bnxt_dl_reporter_create()
282 int rc; in bnxt_devlink_health_fw_report() local
296 rc = devlink_health_report(fw_health->fw_reporter, "FW error reported", in bnxt_devlink_health_fw_report()
298 if (rc == -ECANCELED) in bnxt_devlink_health_fw_report()
392 int rc; in bnxt_dl_livepatch_activate() local
399 rc = hwrm_req_init(bp, query_req, HWRM_FW_LIVEPATCH_QUERY); in bnxt_dl_livepatch_activate()
400 if (rc) in bnxt_dl_livepatch_activate()
401 return rc; in bnxt_dl_livepatch_activate()
404 rc = hwrm_req_init(bp, patch_req, HWRM_FW_LIVEPATCH); in bnxt_dl_livepatch_activate()
405 if (rc) { in bnxt_dl_livepatch_activate()
407 return rc; in bnxt_dl_livepatch_activate()
414 rc = hwrm_req_send(bp, query_req); in bnxt_dl_livepatch_activate()
415 if (rc) { in bnxt_dl_livepatch_activate()
437 rc = hwrm_req_send(bp, patch_req); in bnxt_dl_livepatch_activate()
438 if (rc) { in bnxt_dl_livepatch_activate()
445 if (!rc && !installed) { in bnxt_dl_livepatch_activate()
448 rc = -EEXIST; in bnxt_dl_livepatch_activate()
451 rc = -ENOENT; in bnxt_dl_livepatch_activate()
456 return rc; in bnxt_dl_livepatch_activate()
465 int rc = 0; in bnxt_dl_reload_down() local
482 rc = bnxt_close_nic(bp, true, true); in bnxt_dl_reload_down()
483 if (rc) { in bnxt_dl_reload_down()
491 rc = bnxt_hwrm_func_drv_unrgtr(bp); in bnxt_dl_reload_down()
492 if (rc) { in bnxt_dl_reload_down()
524 rc = bnxt_hwrm_firmware_reset(bp->dev, in bnxt_dl_reload_down()
529 if (rc) { in bnxt_dl_reload_down()
537 rc = -EOPNOTSUPP; in bnxt_dl_reload_down()
540 return rc; in bnxt_dl_reload_down()
548 int rc = 0; in bnxt_dl_reload_up() local
556 rc = bnxt_open_nic(bp, true, true); in bnxt_dl_reload_up()
557 bnxt_ulp_start(bp, rc); in bnxt_dl_reload_up()
558 if (!rc) { in bnxt_dl_reload_up()
579 rc = -ETIMEDOUT; in bnxt_dl_reload_up()
584 rc = -ENODEV; in bnxt_dl_reload_up()
590 if (!rc) in bnxt_dl_reload_up()
599 if (!rc) { in bnxt_dl_reload_up()
611 return rc; in bnxt_dl_reload_up()
616 bool rc = false; in bnxt_nvm_test() local
645 rc = true; in bnxt_nvm_test()
649 return rc; in bnxt_nvm_test()
759 int rc, i = 2; in bnxt_hwrm_get_nvm_cfg_ver() local
762 rc = hwrm_req_init(bp, req, HWRM_NVM_GET_VARIABLE); in bnxt_hwrm_get_nvm_cfg_ver()
763 if (rc) in bnxt_hwrm_get_nvm_cfg_ver()
764 return rc; in bnxt_hwrm_get_nvm_cfg_ver()
768 rc = -ENOMEM; in bnxt_hwrm_get_nvm_cfg_ver()
788 rc = hwrm_req_send_silent(bp, req); in bnxt_hwrm_get_nvm_cfg_ver()
789 if (rc) in bnxt_hwrm_get_nvm_cfg_ver()
803 return rc; in bnxt_hwrm_get_nvm_cfg_ver()
839 int rc; in bnxt_dl_livepatch_info_put() local
844 rc = hwrm_req_init(bp, query, HWRM_FW_LIVEPATCH_QUERY); in bnxt_dl_livepatch_info_put()
845 if (rc) in bnxt_dl_livepatch_info_put()
846 return rc; in bnxt_dl_livepatch_info_put()
856 rc = hwrm_req_send(bp, query); in bnxt_dl_livepatch_info_put()
857 if (rc) in bnxt_dl_livepatch_info_put()
863 rc = devlink_info_version_running_put(req, key, resp->active_ver); in bnxt_dl_livepatch_info_put()
864 if (rc) in bnxt_dl_livepatch_info_put()
870 rc = devlink_info_version_stored_put(req, key, resp->install_ver); in bnxt_dl_livepatch_info_put()
871 if (rc) in bnxt_dl_livepatch_info_put()
877 return rc; in bnxt_dl_livepatch_info_put()
893 int rc; in bnxt_dl_info_get() local
899 rc = devlink_info_serial_number_put(req, buf); in bnxt_dl_info_get()
900 if (rc) in bnxt_dl_info_get()
901 return rc; in bnxt_dl_info_get()
905 rc = devlink_info_board_serial_number_put(req, bp->board_serialno); in bnxt_dl_info_get()
906 if (rc) in bnxt_dl_info_get()
907 return rc; in bnxt_dl_info_get()
910 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
913 if (rc) in bnxt_dl_info_get()
914 return rc; in bnxt_dl_info_get()
917 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
919 if (rc) in bnxt_dl_info_get()
920 return rc; in bnxt_dl_info_get()
924 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
926 if (rc) in bnxt_dl_info_get()
927 return rc; in bnxt_dl_info_get()
929 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
932 if (rc) in bnxt_dl_info_get()
933 return rc; in bnxt_dl_info_get()
937 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, 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()
948 if (rc) in bnxt_dl_info_get()
949 return rc; in bnxt_dl_info_get()
977 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
979 if (rc) in bnxt_dl_info_get()
980 return rc; in bnxt_dl_info_get()
982 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
985 if (rc) in bnxt_dl_info_get()
986 return rc; in bnxt_dl_info_get()
988 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
990 if (rc) in bnxt_dl_info_get()
991 return rc; in bnxt_dl_info_get()
993 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
995 if (rc) in bnxt_dl_info_get()
996 return rc; in bnxt_dl_info_get()
998 rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); in bnxt_dl_info_get()
999 if (rc || in bnxt_dl_info_get()
1010 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1012 if (rc) in bnxt_dl_info_get()
1013 return rc; in bnxt_dl_info_get()
1018 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1020 if (rc) in bnxt_dl_info_get()
1021 return rc; in bnxt_dl_info_get()
1026 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1028 if (rc) in bnxt_dl_info_get()
1029 return rc; in bnxt_dl_info_get()
1034 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1036 if (rc) in bnxt_dl_info_get()
1037 return rc; in bnxt_dl_info_get()
1040 rc = bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_SRT_PATCH); in bnxt_dl_info_get()
1041 if (rc) in bnxt_dl_info_get()
1042 return rc; in bnxt_dl_info_get()
1056 int idx = 0, rc, i; in bnxt_hwrm_nvm_req() local
1099 rc = hwrm_req_send(bp, msg); in bnxt_hwrm_nvm_req()
1101 rc = hwrm_req_send_silent(bp, msg); in bnxt_hwrm_nvm_req()
1102 if (!rc) { in bnxt_hwrm_nvm_req()
1109 rc = -EOPNOTSUPP; in bnxt_hwrm_nvm_req()
1113 if (rc == -EACCES) in bnxt_hwrm_nvm_req()
1115 return rc; in bnxt_hwrm_nvm_req()
1123 int rc; in bnxt_dl_nvm_param_get() local
1125 rc = hwrm_req_init(bp, req, HWRM_NVM_GET_VARIABLE); in bnxt_dl_nvm_param_get()
1126 if (rc) in bnxt_dl_nvm_param_get()
1127 return rc; in bnxt_dl_nvm_param_get()
1129 rc = bnxt_hwrm_nvm_req(bp, id, req, &ctx->val); in bnxt_dl_nvm_param_get()
1130 if (!rc && id == BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK) in bnxt_dl_nvm_param_get()
1133 return rc; in bnxt_dl_nvm_param_get()
1141 int rc; in bnxt_dl_nvm_param_set() local
1143 rc = hwrm_req_init(bp, req, HWRM_NVM_SET_VARIABLE); in bnxt_dl_nvm_param_set()
1144 if (rc) in bnxt_dl_nvm_param_set()
1145 return rc; in bnxt_dl_nvm_param_set()
1189 int rc; in bnxt_remote_dev_reset_set() local
1191 rc = bnxt_hwrm_remote_dev_reset_set(bp, ctx->val.vbool); in bnxt_remote_dev_reset_set()
1192 if (rc) in bnxt_remote_dev_reset_set()
1193 return rc; in bnxt_remote_dev_reset_set()
1196 return rc; in bnxt_remote_dev_reset_set()
1231 int rc; in bnxt_dl_params_register() local
1239 rc = devlink_params_register(bp->dl, bnxt_dl_params, num_params); in bnxt_dl_params_register()
1240 if (rc) in bnxt_dl_params_register()
1241 netdev_warn(bp->dev, "devlink_params_register failed. rc=%d\n", in bnxt_dl_params_register()
1242 rc); in bnxt_dl_params_register()
1243 return rc; in bnxt_dl_params_register()
1265 int rc; in bnxt_dl_register() local
1296 rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); in bnxt_dl_register()
1297 if (rc) { in bnxt_dl_register()
1302 rc = bnxt_dl_params_register(bp); in bnxt_dl_register()
1303 if (rc) in bnxt_dl_register()
1314 return rc; in bnxt_dl_register()