| 4522 | } |
| 4523 | |
| 4524 | static int bnxt_fw_reset_all(struct bnxt *bp) |
| 4525 | { |
| 4526 | struct bnxt_error_recovery_info *info = bp->recovery_info; |
| 4527 | uint32_t i; |
| 4528 | int rc = 0; |
| 4529 | |
| 4530 | if (info->flags & BNXT_FLAG_ERROR_RECOVERY_HOST) { |
| 4531 | /* Reset through primary function driver */ |
| 4532 | for (i = 0; i < info->reg_array_cnt; i++) |
| 4533 | bnxt_write_fw_reset_reg(bp, i); |
| 4534 | /* Wait for time specified by FW after triggering reset */ |
| 4535 | rte_delay_ms(info->primary_func_wait_period_after_reset); |
| 4536 | } else if (info->flags & BNXT_FLAG_ERROR_RECOVERY_CO_CPU) { |
| 4537 | /* Reset with the help of Kong processor */ |
| 4538 | rc = bnxt_hwrm_fw_reset(bp); |
| 4539 | if (rc) |
| 4540 | PMD_DRV_LOG(ERR, "Failed to reset FW\n"); |
| 4541 | } |
| 4542 | |
| 4543 | return rc; |
| 4544 | } |
| 4545 | |
| 4546 | static void bnxt_fw_reset_cb(void *arg) |
| 4547 | { |
no test coverage detected