Lines Matching refs:fw_health

2340 	struct bnxt_fw_health *fw_health = bp->fw_health;  in bnxt_fw_health_readl()  local
2341 u32 reg = fw_health->regs[reg_idx]; in bnxt_fw_health_readl()
2351 reg_off = fw_health->mapped_regs[reg_idx]; in bnxt_fw_health_readl()
2361 val &= fw_health->fw_reset_inprog_reg_mask; in bnxt_fw_health_readl()
2637 if (!bp->fw_health) in bnxt_async_event_process()
2651 bp->fw_health->fatalities++; in bnxt_async_event_process()
2656 bp->fw_health->survivals++; in bnxt_async_event_process()
2668 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2672 if (!fw_health) in bnxt_async_event_process()
2676 fw_health->enabled = false; in bnxt_async_event_process()
2680 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); in bnxt_async_event_process()
2681 fw_health->tmr_multiplier = in bnxt_async_event_process()
2682 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, in bnxt_async_event_process()
2684 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_async_event_process()
2685 if (!fw_health->enabled) in bnxt_async_event_process()
2686 fw_health->last_fw_heartbeat = in bnxt_async_event_process()
2688 fw_health->last_fw_reset_cnt = in bnxt_async_event_process()
2695 fw_health->primary ? "primary" : "backup", status, in bnxt_async_event_process()
2696 status_desc, fw_health->last_fw_reset_cnt); in bnxt_async_event_process()
2697 if (!fw_health->enabled) { in bnxt_async_event_process()
2702 fw_health->enabled = true; in bnxt_async_event_process()
2734 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2739 if (fw_health) { in bnxt_async_event_process()
2740 fw_health->echo_req_data1 = data1; in bnxt_async_event_process()
2741 fw_health->echo_req_data2 = data2; in bnxt_async_event_process()
9332 if (bp->fw_health) in __bnxt_alloc_fw_health()
9335 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); in __bnxt_alloc_fw_health()
9336 if (!bp->fw_health) in __bnxt_alloc_fw_health()
9339 mutex_init(&bp->fw_health->lock); in __bnxt_alloc_fw_health()
9370 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_inv_fw_health_reg() local
9373 if (!fw_health) in bnxt_inv_fw_health_reg()
9376 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]); in bnxt_inv_fw_health_reg()
9378 fw_health->status_reliable = false; in bnxt_inv_fw_health_reg()
9380 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]); in bnxt_inv_fw_health_reg()
9382 fw_health->resets_reliable = false; in bnxt_inv_fw_health_reg()
9392 if (bp->fw_health) in bnxt_try_map_fw_health_reg()
9393 bp->fw_health->status_reliable = false; in bnxt_try_map_fw_health_reg()
9421 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc; in bnxt_try_map_fw_health_reg()
9425 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] = in bnxt_try_map_fw_health_reg()
9429 bp->fw_health->status_reliable = true; in bnxt_try_map_fw_health_reg()
9434 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_map_fw_health_regs() local
9438 bp->fw_health->status_reliable = false; in bnxt_map_fw_health_regs()
9439 bp->fw_health->resets_reliable = false; in bnxt_map_fw_health_regs()
9442 u32 reg = fw_health->regs[i]; in bnxt_map_fw_health_regs()
9450 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg); in bnxt_map_fw_health_regs()
9452 bp->fw_health->status_reliable = true; in bnxt_map_fw_health_regs()
9453 bp->fw_health->resets_reliable = true; in bnxt_map_fw_health_regs()
9463 if (!bp->fw_health) in bnxt_remap_fw_health_regs()
9467 bp->fw_health->status_reliable = true; in bnxt_remap_fw_health_regs()
9468 bp->fw_health->resets_reliable = true; in bnxt_remap_fw_health_regs()
9476 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_hwrm_error_recovery_qcfg() local
9492 fw_health->flags = le32_to_cpu(resp->flags); in bnxt_hwrm_error_recovery_qcfg()
9493 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) && in bnxt_hwrm_error_recovery_qcfg()
9498 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq); in bnxt_hwrm_error_recovery_qcfg()
9499 fw_health->master_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9501 fw_health->normal_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9503 fw_health->post_reset_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9505 fw_health->post_reset_max_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
9507 fw_health->regs[BNXT_FW_HEALTH_REG] = in bnxt_hwrm_error_recovery_qcfg()
9509 fw_health->regs[BNXT_FW_HEARTBEAT_REG] = in bnxt_hwrm_error_recovery_qcfg()
9511 fw_health->regs[BNXT_FW_RESET_CNT_REG] = in bnxt_hwrm_error_recovery_qcfg()
9513 fw_health->regs[BNXT_FW_RESET_INPROG_REG] = in bnxt_hwrm_error_recovery_qcfg()
9515 fw_health->fw_reset_inprog_reg_mask = in bnxt_hwrm_error_recovery_qcfg()
9517 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt; in bnxt_hwrm_error_recovery_qcfg()
9518 if (fw_health->fw_reset_seq_cnt >= 16) { in bnxt_hwrm_error_recovery_qcfg()
9522 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) { in bnxt_hwrm_error_recovery_qcfg()
9523 fw_health->fw_reset_seq_regs[i] = in bnxt_hwrm_error_recovery_qcfg()
9525 fw_health->fw_reset_seq_vals[i] = in bnxt_hwrm_error_recovery_qcfg()
9527 fw_health->fw_reset_seq_delay_msec[i] = in bnxt_hwrm_error_recovery_qcfg()
11619 if (bp->fw_health && bp->fw_health->status_reliable) { in bnxt_try_recover_fw()
13280 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_check() local
13284 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) in bnxt_fw_health_check()
13289 if (fw_health->tmr_counter) { in bnxt_fw_health_check()
13290 fw_health->tmr_counter--; in bnxt_fw_health_check()
13295 if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
13296 fw_health->arrests++; in bnxt_fw_health_check()
13300 fw_health->last_fw_heartbeat = val; in bnxt_fw_health_check()
13303 if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
13304 fw_health->discoveries++; in bnxt_fw_health_check()
13308 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_fw_health_check()
13469 struct bnxt_fw_health *fw_health = bp->fw_health; in is_bnxt_fw_ok() local
13474 if (val == fw_health->last_fw_heartbeat) in is_bnxt_fw_ok()
13478 if (val != fw_health->last_fw_reset_cnt) in is_bnxt_fw_ok()
13490 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_force_fw_reset() local
13508 wait_dsecs = fw_health->master_func_wait_dsecs; in bnxt_force_fw_reset()
13509 if (fw_health->primary) { in bnxt_force_fw_reset()
13510 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) in bnxt_force_fw_reset()
13515 wait_dsecs = fw_health->normal_func_wait_dsecs; in bnxt_force_fw_reset()
13519 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; in bnxt_force_fw_reset()
13520 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; in bnxt_force_fw_reset()
13675 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_echo_reply() local
13682 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1); in bnxt_fw_echo_reply()
13683 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2); in bnxt_fw_echo_reply()
14104 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_reset_writel() local
14105 u32 reg = fw_health->fw_reset_seq_regs[reg_idx]; in bnxt_fw_reset_writel()
14106 u32 val = fw_health->fw_reset_seq_vals[reg_idx]; in bnxt_fw_reset_writel()
14109 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx]; in bnxt_fw_reset_writel()
14157 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_reset_all() local
14166 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) { in bnxt_reset_all()
14167 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) in bnxt_reset_all()
14169 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) { in bnxt_reset_all()
14261 if (!bp->fw_health->primary) { in bnxt_fw_reset_task()
14262 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; in bnxt_fw_reset_task()
14334 bp->fw_health->enabled) { in bnxt_fw_reset_task()
14335 bp->fw_health->last_fw_reset_cnt = in bnxt_fw_reset_task()
14360 if (bp->fw_health->status_reliable || in bnxt_fw_reset_task()
15316 kfree(bp->fw_health); in bnxt_remove_one()
15317 bp->fw_health = NULL; in bnxt_remove_one()
15958 kfree(bp->fw_health); in bnxt_init_one()
15959 bp->fw_health = NULL; in bnxt_init_one()