| 4544 | } |
| 4545 | |
| 4546 | static void bnxt_fw_reset_cb(void *arg) |
| 4547 | { |
| 4548 | struct bnxt *bp = arg; |
| 4549 | struct bnxt_error_recovery_info *info = bp->recovery_info; |
| 4550 | int rc = 0; |
| 4551 | |
| 4552 | /* Only Primary function can do FW reset */ |
| 4553 | if (bnxt_is_primary_func(bp) && |
| 4554 | bnxt_is_recovery_enabled(bp)) { |
| 4555 | rc = bnxt_fw_reset_all(bp); |
| 4556 | if (rc) { |
| 4557 | PMD_DRV_LOG(ERR, "Adapter recovery failed\n"); |
| 4558 | return; |
| 4559 | } |
| 4560 | } |
| 4561 | |
| 4562 | /* if recovery method is ERROR_RECOVERY_CO_CPU, KONG will send |
| 4563 | * EXCEPTION_FATAL_ASYNC event to all the functions |
| 4564 | * (including MASTER FUNC). After receiving this Async, all the active |
| 4565 | * drivers should treat this case as FW initiated recovery |
| 4566 | */ |
| 4567 | if (info->flags & BNXT_FLAG_ERROR_RECOVERY_HOST) { |
| 4568 | bp->fw_reset_min_msecs = BNXT_MIN_FW_READY_TIMEOUT; |
| 4569 | bp->fw_reset_max_msecs = BNXT_MAX_FW_RESET_TIMEOUT; |
| 4570 | |
| 4571 | /* To recover from error */ |
| 4572 | rte_eal_alarm_set(US_PER_MS, bnxt_dev_reset_and_resume, |
| 4573 | (void *)bp); |
| 4574 | } |
| 4575 | } |
| 4576 | |
| 4577 | /* Driver should poll FW heartbeat, reset_counter with the frequency |
| 4578 | * advertised by FW in HWRM_ERROR_RECOVERY_QCFG. |
nothing calls this directly
no test coverage detected