Lines Matching refs:fw_health

2108 	struct bnxt_fw_health *fw_health = bp->fw_health;  in bnxt_fw_health_readl()  local
2109 u32 reg = fw_health->regs[reg_idx]; in bnxt_fw_health_readl()
2119 reg_off = fw_health->mapped_regs[reg_idx]; in bnxt_fw_health_readl()
2129 val &= fw_health->fw_reset_inprog_reg_mask; in bnxt_fw_health_readl()
2253 if (!bp->fw_health) in bnxt_async_event_process()
2267 bp->fw_health->fatalities++; in bnxt_async_event_process()
2272 bp->fw_health->survivals++; in bnxt_async_event_process()
2284 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2288 if (!fw_health) in bnxt_async_event_process()
2292 fw_health->enabled = false; in bnxt_async_event_process()
2296 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); in bnxt_async_event_process()
2297 fw_health->tmr_multiplier = in bnxt_async_event_process()
2298 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, in bnxt_async_event_process()
2300 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_async_event_process()
2301 if (!fw_health->enabled) in bnxt_async_event_process()
2302 fw_health->last_fw_heartbeat = in bnxt_async_event_process()
2304 fw_health->last_fw_reset_cnt = in bnxt_async_event_process()
2311 fw_health->primary ? "primary" : "backup", status, in bnxt_async_event_process()
2312 status_desc, fw_health->last_fw_reset_cnt); in bnxt_async_event_process()
2313 if (!fw_health->enabled) { in bnxt_async_event_process()
2318 fw_health->enabled = true; in bnxt_async_event_process()
2350 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2355 if (fw_health) { in bnxt_async_event_process()
2356 fw_health->echo_req_data1 = data1; in bnxt_async_event_process()
2357 fw_health->echo_req_data2 = data2; in bnxt_async_event_process()
7861 if (bp->fw_health) in __bnxt_alloc_fw_health()
7864 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); in __bnxt_alloc_fw_health()
7865 if (!bp->fw_health) in __bnxt_alloc_fw_health()
7868 mutex_init(&bp->fw_health->lock); in __bnxt_alloc_fw_health()
7899 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_inv_fw_health_reg() local
7902 if (!fw_health) in bnxt_inv_fw_health_reg()
7905 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]); in bnxt_inv_fw_health_reg()
7907 fw_health->status_reliable = false; in bnxt_inv_fw_health_reg()
7909 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]); in bnxt_inv_fw_health_reg()
7911 fw_health->resets_reliable = false; in bnxt_inv_fw_health_reg()
7921 if (bp->fw_health) in bnxt_try_map_fw_health_reg()
7922 bp->fw_health->status_reliable = false; in bnxt_try_map_fw_health_reg()
7950 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc; in bnxt_try_map_fw_health_reg()
7954 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] = in bnxt_try_map_fw_health_reg()
7958 bp->fw_health->status_reliable = true; in bnxt_try_map_fw_health_reg()
7963 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_map_fw_health_regs() local
7967 bp->fw_health->status_reliable = false; in bnxt_map_fw_health_regs()
7968 bp->fw_health->resets_reliable = false; in bnxt_map_fw_health_regs()
7971 u32 reg = fw_health->regs[i]; in bnxt_map_fw_health_regs()
7979 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg); in bnxt_map_fw_health_regs()
7981 bp->fw_health->status_reliable = true; in bnxt_map_fw_health_regs()
7982 bp->fw_health->resets_reliable = true; in bnxt_map_fw_health_regs()
7992 if (!bp->fw_health) in bnxt_remap_fw_health_regs()
7996 bp->fw_health->status_reliable = true; in bnxt_remap_fw_health_regs()
7997 bp->fw_health->resets_reliable = true; in bnxt_remap_fw_health_regs()
8005 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_hwrm_error_recovery_qcfg() local
8021 fw_health->flags = le32_to_cpu(resp->flags); in bnxt_hwrm_error_recovery_qcfg()
8022 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) && in bnxt_hwrm_error_recovery_qcfg()
8027 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq); in bnxt_hwrm_error_recovery_qcfg()
8028 fw_health->master_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8030 fw_health->normal_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8032 fw_health->post_reset_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8034 fw_health->post_reset_max_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8036 fw_health->regs[BNXT_FW_HEALTH_REG] = in bnxt_hwrm_error_recovery_qcfg()
8038 fw_health->regs[BNXT_FW_HEARTBEAT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8040 fw_health->regs[BNXT_FW_RESET_CNT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8042 fw_health->regs[BNXT_FW_RESET_INPROG_REG] = in bnxt_hwrm_error_recovery_qcfg()
8044 fw_health->fw_reset_inprog_reg_mask = in bnxt_hwrm_error_recovery_qcfg()
8046 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt; in bnxt_hwrm_error_recovery_qcfg()
8047 if (fw_health->fw_reset_seq_cnt >= 16) { in bnxt_hwrm_error_recovery_qcfg()
8051 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) { in bnxt_hwrm_error_recovery_qcfg()
8052 fw_health->fw_reset_seq_regs[i] = in bnxt_hwrm_error_recovery_qcfg()
8054 fw_health->fw_reset_seq_vals[i] = in bnxt_hwrm_error_recovery_qcfg()
8056 fw_health->fw_reset_seq_delay_msec[i] = in bnxt_hwrm_error_recovery_qcfg()
9990 if (bp->fw_health && bp->fw_health->status_reliable) { in bnxt_try_recover_fw()
11653 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_check() local
11657 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) in bnxt_fw_health_check()
11662 if (fw_health->tmr_counter) { in bnxt_fw_health_check()
11663 fw_health->tmr_counter--; in bnxt_fw_health_check()
11668 if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
11669 fw_health->arrests++; in bnxt_fw_health_check()
11673 fw_health->last_fw_heartbeat = val; in bnxt_fw_health_check()
11676 if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) { in bnxt_fw_health_check()
11677 fw_health->discoveries++; in bnxt_fw_health_check()
11681 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_fw_health_check()
11841 struct bnxt_fw_health *fw_health = bp->fw_health; in is_bnxt_fw_ok() local
11846 if (val == fw_health->last_fw_heartbeat) in is_bnxt_fw_ok()
11850 if (val != fw_health->last_fw_reset_cnt) in is_bnxt_fw_ok()
11862 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_force_fw_reset() local
11878 wait_dsecs = fw_health->master_func_wait_dsecs; in bnxt_force_fw_reset()
11879 if (fw_health->primary) { in bnxt_force_fw_reset()
11880 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) in bnxt_force_fw_reset()
11885 wait_dsecs = fw_health->normal_func_wait_dsecs; in bnxt_force_fw_reset()
11889 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; in bnxt_force_fw_reset()
11890 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; in bnxt_force_fw_reset()
12049 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_echo_reply() local
12056 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1); in bnxt_fw_echo_reply()
12057 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2); in bnxt_fw_echo_reply()
12410 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_reset_writel() local
12411 u32 reg = fw_health->fw_reset_seq_regs[reg_idx]; in bnxt_fw_reset_writel()
12412 u32 val = fw_health->fw_reset_seq_vals[reg_idx]; in bnxt_fw_reset_writel()
12415 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx]; in bnxt_fw_reset_writel()
12463 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_reset_all() local
12472 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) { in bnxt_reset_all()
12473 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) in bnxt_reset_all()
12475 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) { in bnxt_reset_all()
12569 if (!bp->fw_health->primary) { in bnxt_fw_reset_task()
12570 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; in bnxt_fw_reset_task()
12642 bp->fw_health->enabled) { in bnxt_fw_reset_task()
12643 bp->fw_health->last_fw_reset_cnt = in bnxt_fw_reset_task()
12666 if (bp->fw_health->status_reliable || in bnxt_fw_reset_task()
13236 kfree(bp->fw_health); in bnxt_remove_one()
13237 bp->fw_health = NULL; in bnxt_remove_one()
13832 kfree(bp->fw_health); in bnxt_init_one()
13833 bp->fw_health = NULL; in bnxt_init_one()