Lines Matching refs:fw_health

2339 	struct bnxt_fw_health *fw_health = bp->fw_health;  in bnxt_fw_health_readl()  local
2340 u32 reg = fw_health->regs[reg_idx]; in bnxt_fw_health_readl()
2350 reg_off = fw_health->mapped_regs[reg_idx]; in bnxt_fw_health_readl()
2360 val &= fw_health->fw_reset_inprog_reg_mask; in bnxt_fw_health_readl()
2636 if (!bp->fw_health) in bnxt_async_event_process()
2650 bp->fw_health->fatalities++; in bnxt_async_event_process()
2655 bp->fw_health->survivals++; in bnxt_async_event_process()
2667 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2671 if (!fw_health) in bnxt_async_event_process()
2675 fw_health->enabled = false; in bnxt_async_event_process()
2679 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); in bnxt_async_event_process()
2680 fw_health->tmr_multiplier = in bnxt_async_event_process()
2681 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, in bnxt_async_event_process()
2683 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_async_event_process()
2684 if (!fw_health->enabled) in bnxt_async_event_process()
2685 fw_health->last_fw_heartbeat = in bnxt_async_event_process()
2687 fw_health->last_fw_reset_cnt = in bnxt_async_event_process()
2694 fw_health->primary ? "primary" : "backup", status, in bnxt_async_event_process()
2695 status_desc, fw_health->last_fw_reset_cnt); in bnxt_async_event_process()
2696 if (!fw_health->enabled) { in bnxt_async_event_process()
2701 fw_health->enabled = true; in bnxt_async_event_process()
2733 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2738 if (fw_health) { in bnxt_async_event_process()
2739 fw_health->echo_req_data1 = data1; in bnxt_async_event_process()
2740 fw_health->echo_req_data2 = data2; in bnxt_async_event_process()
9330 if (bp->fw_health) in __bnxt_alloc_fw_health()
9333 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); in __bnxt_alloc_fw_health()
9334 if (!bp->fw_health) in __bnxt_alloc_fw_health()
9337 mutex_init(&bp->fw_health->lock); in __bnxt_alloc_fw_health()
9368 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_inv_fw_health_reg() local
9371 if (!fw_health) in bnxt_inv_fw_health_reg()
9374 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]); in bnxt_inv_fw_health_reg()
9376 fw_health->status_reliable = false; in bnxt_inv_fw_health_reg()
9378 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]); in bnxt_inv_fw_health_reg()
9380 fw_health->resets_reliable = false; in bnxt_inv_fw_health_reg()
9390 if (bp->fw_health) in bnxt_try_map_fw_health_reg()
9391 bp->fw_health->status_reliable = false; in bnxt_try_map_fw_health_reg()
9419 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc; in bnxt_try_map_fw_health_reg()
9423 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] = in bnxt_try_map_fw_health_reg()
9427 bp->fw_health->status_reliable = true; in bnxt_try_map_fw_health_reg()
9432 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_map_fw_health_regs() local
9436 bp->fw_health->status_reliable = false; in bnxt_map_fw_health_regs()
9437 bp->fw_health->resets_reliable = false; in bnxt_map_fw_health_regs()
9440 u32 reg = fw_health->regs[i]; in bnxt_map_fw_health_regs()
9448 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg); in bnxt_map_fw_health_regs()
9450 bp->fw_health->status_reliable = true; in bnxt_map_fw_health_regs()
9451 bp->fw_health->resets_reliable = true; in bnxt_map_fw_health_regs()
9461 if (!bp->fw_health) in bnxt_remap_fw_health_regs()
9465 bp->fw_health->status_reliable = true; in bnxt_remap_fw_health_regs()
9466 bp->fw_health->resets_reliable = true; in bnxt_remap_fw_health_regs()
9474 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_hwrm_error_recovery_qcfg() local
9490 fw_health->flags = le32_to_cpu(resp->flags); in bnxt_hwrm_error_recovery_qcfg()
9491 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) && in bnxt_hwrm_error_recovery_qcfg()
9496 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq); in bnxt_hwrm_error_recovery_qcfg()
9497 fw_health->master_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9499 fw_health->normal_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9501 fw_health->post_reset_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9503 fw_health->post_reset_max_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9505 fw_health->regs[BNXT_FW_HEALTH_REG] = in bnxt_hwrm_error_recovery_qcfg()
9507 fw_health->regs[BNXT_FW_HEARTBEAT_REG] = in bnxt_hwrm_error_recovery_qcfg()
9509 fw_health->regs[BNXT_FW_RESET_CNT_REG] = in bnxt_hwrm_error_recovery_qcfg()
9511 fw_health->regs[BNXT_FW_RESET_INPROG_REG] = in bnxt_hwrm_error_recovery_qcfg()
9513 fw_health->fw_reset_inprog_reg_mask = in bnxt_hwrm_error_recovery_qcfg()
9515 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt; in bnxt_hwrm_error_recovery_qcfg()
9516 if (fw_health->fw_reset_seq_cnt >= 16) { in bnxt_hwrm_error_recovery_qcfg()
9520 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) { in bnxt_hwrm_error_recovery_qcfg()
9521 fw_health->fw_reset_seq_regs[i] = in bnxt_hwrm_error_recovery_qcfg()
9523 fw_health->fw_reset_seq_vals[i] = in bnxt_hwrm_error_recovery_qcfg()
9525 fw_health->fw_reset_seq_delay_msec[i] = in bnxt_hwrm_error_recovery_qcfg()
11617 if (bp->fw_health && bp->fw_health->status_reliable) { in bnxt_try_recover_fw()
13278 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_check() local
13282 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) in bnxt_fw_health_check()
13287 if (fw_health->tmr_counter) { in bnxt_fw_health_check()
13288 fw_health->tmr_counter--; in bnxt_fw_health_check()
13293 if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
13294 fw_health->arrests++; in bnxt_fw_health_check()
13298 fw_health->last_fw_heartbeat = val; in bnxt_fw_health_check()
13301 if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
13302 fw_health->discoveries++; in bnxt_fw_health_check()
13306 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_fw_health_check()
13467 struct bnxt_fw_health *fw_health = bp->fw_health; in is_bnxt_fw_ok() local
13472 if (val == fw_health->last_fw_heartbeat) in is_bnxt_fw_ok()
13476 if (val != fw_health->last_fw_reset_cnt) in is_bnxt_fw_ok()
13488 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_force_fw_reset() local
13504 wait_dsecs = fw_health->master_func_wait_dsecs; in bnxt_force_fw_reset()
13505 if (fw_health->primary) { in bnxt_force_fw_reset()
13506 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) in bnxt_force_fw_reset()
13511 wait_dsecs = fw_health->normal_func_wait_dsecs; in bnxt_force_fw_reset()
13515 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; in bnxt_force_fw_reset()
13516 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; in bnxt_force_fw_reset()
13669 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_echo_reply() local
13676 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1); in bnxt_fw_echo_reply()
13677 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2); in bnxt_fw_echo_reply()
14098 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_reset_writel() local
14099 u32 reg = fw_health->fw_reset_seq_regs[reg_idx]; in bnxt_fw_reset_writel()
14100 u32 val = fw_health->fw_reset_seq_vals[reg_idx]; in bnxt_fw_reset_writel()
14103 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx]; in bnxt_fw_reset_writel()
14151 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_reset_all() local
14160 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) { in bnxt_reset_all()
14161 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) in bnxt_reset_all()
14163 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) { in bnxt_reset_all()
14255 if (!bp->fw_health->primary) { in bnxt_fw_reset_task()
14256 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; in bnxt_fw_reset_task()
14328 bp->fw_health->enabled) { in bnxt_fw_reset_task()
14329 bp->fw_health->last_fw_reset_cnt = in bnxt_fw_reset_task()
14354 if (bp->fw_health->status_reliable || in bnxt_fw_reset_task()
15310 kfree(bp->fw_health); in bnxt_remove_one()
15311 bp->fw_health = NULL; in bnxt_remove_one()
15952 kfree(bp->fw_health); in bnxt_init_one()
15953 bp->fw_health = NULL; in bnxt_init_one()