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
895 rc = devlink_info_driver_name_put(req, DRV_MODULE_NAME); in bnxt_dl_info_get()
896 if (rc) in bnxt_dl_info_get()
897 return rc; in bnxt_dl_info_get()
903 rc = devlink_info_serial_number_put(req, buf); in bnxt_dl_info_get()
904 if (rc) in bnxt_dl_info_get()
905 return rc; in bnxt_dl_info_get()
909 rc = devlink_info_board_serial_number_put(req, bp->board_serialno); in bnxt_dl_info_get()
910 if (rc) in bnxt_dl_info_get()
911 return rc; in bnxt_dl_info_get()
914 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
917 if (rc) in bnxt_dl_info_get()
918 return rc; in bnxt_dl_info_get()
921 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
923 if (rc) in bnxt_dl_info_get()
924 return rc; in bnxt_dl_info_get()
928 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, in bnxt_dl_info_get()
930 if (rc) in bnxt_dl_info_get()
931 return rc; in bnxt_dl_info_get()
933 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
936 if (rc) in bnxt_dl_info_get()
937 return rc; in bnxt_dl_info_get()
941 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
943 if (rc) in bnxt_dl_info_get()
944 return rc; in bnxt_dl_info_get()
949 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
952 if (rc) in bnxt_dl_info_get()
953 return rc; in bnxt_dl_info_get()
981 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
983 if (rc) in bnxt_dl_info_get()
984 return rc; in bnxt_dl_info_get()
986 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
989 if (rc) in bnxt_dl_info_get()
990 return rc; in bnxt_dl_info_get()
992 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
994 if (rc) in bnxt_dl_info_get()
995 return rc; in bnxt_dl_info_get()
997 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_RUNNING, in bnxt_dl_info_get()
999 if (rc) in bnxt_dl_info_get()
1000 return rc; in bnxt_dl_info_get()
1002 rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); in bnxt_dl_info_get()
1003 if (rc || in bnxt_dl_info_get()
1014 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1016 if (rc) in bnxt_dl_info_get()
1017 return rc; in bnxt_dl_info_get()
1022 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1024 if (rc) in bnxt_dl_info_get()
1025 return rc; in bnxt_dl_info_get()
1030 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1032 if (rc) in bnxt_dl_info_get()
1033 return rc; in bnxt_dl_info_get()
1038 rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, in bnxt_dl_info_get()
1040 if (rc) in bnxt_dl_info_get()
1041 return rc; in bnxt_dl_info_get()
1044 rc = bnxt_dl_livepatch_info_put(bp, req, BNXT_FW_SRT_PATCH); in bnxt_dl_info_get()
1045 if (rc) in bnxt_dl_info_get()
1046 return rc; in bnxt_dl_info_get()
1060 int idx = 0, rc, i; in bnxt_hwrm_nvm_req() local
1103 rc = hwrm_req_send(bp, msg); in bnxt_hwrm_nvm_req()
1105 rc = hwrm_req_send_silent(bp, msg); in bnxt_hwrm_nvm_req()
1106 if (!rc) { in bnxt_hwrm_nvm_req()
1113 rc = -EOPNOTSUPP; in bnxt_hwrm_nvm_req()
1117 if (rc == -EACCES) in bnxt_hwrm_nvm_req()
1119 return rc; in bnxt_hwrm_nvm_req()
1127 int rc; in bnxt_dl_nvm_param_get() local
1129 rc = hwrm_req_init(bp, req, HWRM_NVM_GET_VARIABLE); in bnxt_dl_nvm_param_get()
1130 if (rc) in bnxt_dl_nvm_param_get()
1131 return rc; in bnxt_dl_nvm_param_get()
1133 rc = bnxt_hwrm_nvm_req(bp, id, req, &ctx->val); in bnxt_dl_nvm_param_get()
1134 if (!rc && id == BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK) in bnxt_dl_nvm_param_get()
1137 return rc; in bnxt_dl_nvm_param_get()
1145 int rc; in bnxt_dl_nvm_param_set() local
1147 rc = hwrm_req_init(bp, req, HWRM_NVM_SET_VARIABLE); in bnxt_dl_nvm_param_set()
1148 if (rc) in bnxt_dl_nvm_param_set()
1149 return rc; in bnxt_dl_nvm_param_set()
1193 int rc; in bnxt_remote_dev_reset_set() local
1195 rc = bnxt_hwrm_remote_dev_reset_set(bp, ctx->val.vbool); in bnxt_remote_dev_reset_set()
1196 if (rc) in bnxt_remote_dev_reset_set()
1197 return rc; in bnxt_remote_dev_reset_set()
1200 return rc; in bnxt_remote_dev_reset_set()
1235 int rc; in bnxt_dl_params_register() local
1243 rc = devlink_params_register(bp->dl, bnxt_dl_params, num_params); in bnxt_dl_params_register()
1244 if (rc) in bnxt_dl_params_register()
1245 netdev_warn(bp->dev, "devlink_params_register failed. rc=%d\n", in bnxt_dl_params_register()
1246 rc); in bnxt_dl_params_register()
1247 return rc; in bnxt_dl_params_register()
1269 int rc; in bnxt_dl_register() local
1300 rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); in bnxt_dl_register()
1301 if (rc) { in bnxt_dl_register()
1306 rc = bnxt_dl_params_register(bp); in bnxt_dl_register()
1307 if (rc) in bnxt_dl_register()
1319 return rc; in bnxt_dl_register()