MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_fw_reset_all

Function bnxt_fw_reset_all

dpdk/drivers/net/bnxt/bnxt_ethdev.c:4524–4544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4522}
4523
4524static 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
4546static void bnxt_fw_reset_cb(void *arg)
4547{

Callers 1

bnxt_fw_reset_cbFunction · 0.85

Calls 3

bnxt_write_fw_reset_regFunction · 0.85
rte_delay_msFunction · 0.85
bnxt_hwrm_fw_resetFunction · 0.85

Tested by

no test coverage detected