Lines Matching refs:fw_health

2125 	struct bnxt_fw_health *fw_health = bp->fw_health;  in bnxt_fw_health_readl()  local
2126 u32 reg = fw_health->regs[reg_idx]; in bnxt_fw_health_readl()
2136 reg_off = fw_health->mapped_regs[reg_idx]; in bnxt_fw_health_readl()
2146 val &= fw_health->fw_reset_inprog_reg_mask; in bnxt_fw_health_readl()
2270 if (!bp->fw_health) in bnxt_async_event_process()
2284 bp->fw_health->fatalities++; in bnxt_async_event_process()
2289 bp->fw_health->survivals++; in bnxt_async_event_process()
2301 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2305 if (!fw_health) in bnxt_async_event_process()
2309 fw_health->enabled = false; in bnxt_async_event_process()
2313 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); in bnxt_async_event_process()
2314 fw_health->tmr_multiplier = in bnxt_async_event_process()
2315 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, in bnxt_async_event_process()
2317 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_async_event_process()
2318 if (!fw_health->enabled) in bnxt_async_event_process()
2319 fw_health->last_fw_heartbeat = in bnxt_async_event_process()
2321 fw_health->last_fw_reset_cnt = in bnxt_async_event_process()
2328 fw_health->primary ? "primary" : "backup", status, in bnxt_async_event_process()
2329 status_desc, fw_health->last_fw_reset_cnt); in bnxt_async_event_process()
2330 if (!fw_health->enabled) { in bnxt_async_event_process()
2335 fw_health->enabled = true; in bnxt_async_event_process()
2367 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2372 if (fw_health) { in bnxt_async_event_process()
2373 fw_health->echo_req_data1 = data1; in bnxt_async_event_process()
2374 fw_health->echo_req_data2 = data2; in bnxt_async_event_process()
7880 if (bp->fw_health) in __bnxt_alloc_fw_health()
7883 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); in __bnxt_alloc_fw_health()
7884 if (!bp->fw_health) in __bnxt_alloc_fw_health()
7887 mutex_init(&bp->fw_health->lock); in __bnxt_alloc_fw_health()
7918 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_inv_fw_health_reg() local
7921 if (!fw_health) in bnxt_inv_fw_health_reg()
7924 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]); in bnxt_inv_fw_health_reg()
7926 fw_health->status_reliable = false; in bnxt_inv_fw_health_reg()
7928 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]); in bnxt_inv_fw_health_reg()
7930 fw_health->resets_reliable = false; in bnxt_inv_fw_health_reg()
7940 if (bp->fw_health) in bnxt_try_map_fw_health_reg()
7941 bp->fw_health->status_reliable = false; in bnxt_try_map_fw_health_reg()
7969 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc; in bnxt_try_map_fw_health_reg()
7973 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] = in bnxt_try_map_fw_health_reg()
7977 bp->fw_health->status_reliable = true; in bnxt_try_map_fw_health_reg()
7982 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_map_fw_health_regs() local
7986 bp->fw_health->status_reliable = false; in bnxt_map_fw_health_regs()
7987 bp->fw_health->resets_reliable = false; in bnxt_map_fw_health_regs()
7990 u32 reg = fw_health->regs[i]; in bnxt_map_fw_health_regs()
7998 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg); in bnxt_map_fw_health_regs()
8000 bp->fw_health->status_reliable = true; in bnxt_map_fw_health_regs()
8001 bp->fw_health->resets_reliable = true; in bnxt_map_fw_health_regs()
8011 if (!bp->fw_health) in bnxt_remap_fw_health_regs()
8015 bp->fw_health->status_reliable = true; in bnxt_remap_fw_health_regs()
8016 bp->fw_health->resets_reliable = true; in bnxt_remap_fw_health_regs()
8024 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_hwrm_error_recovery_qcfg() local
8040 fw_health->flags = le32_to_cpu(resp->flags); in bnxt_hwrm_error_recovery_qcfg()
8041 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) && in bnxt_hwrm_error_recovery_qcfg()
8046 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq); in bnxt_hwrm_error_recovery_qcfg()
8047 fw_health->master_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8049 fw_health->normal_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8051 fw_health->post_reset_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8053 fw_health->post_reset_max_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8055 fw_health->regs[BNXT_FW_HEALTH_REG] = in bnxt_hwrm_error_recovery_qcfg()
8057 fw_health->regs[BNXT_FW_HEARTBEAT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8059 fw_health->regs[BNXT_FW_RESET_CNT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8061 fw_health->regs[BNXT_FW_RESET_INPROG_REG] = in bnxt_hwrm_error_recovery_qcfg()
8063 fw_health->fw_reset_inprog_reg_mask = in bnxt_hwrm_error_recovery_qcfg()
8065 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt; in bnxt_hwrm_error_recovery_qcfg()
8066 if (fw_health->fw_reset_seq_cnt >= 16) { in bnxt_hwrm_error_recovery_qcfg()
8070 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) { in bnxt_hwrm_error_recovery_qcfg()
8071 fw_health->fw_reset_seq_regs[i] = in bnxt_hwrm_error_recovery_qcfg()
8073 fw_health->fw_reset_seq_vals[i] = in bnxt_hwrm_error_recovery_qcfg()
8075 fw_health->fw_reset_seq_delay_msec[i] = in bnxt_hwrm_error_recovery_qcfg()
9998 if (bp->fw_health && bp->fw_health->status_reliable) { in bnxt_try_recover_fw()
11628 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_check() local
11631 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) in bnxt_fw_health_check()
11636 if (fw_health->tmr_counter) { in bnxt_fw_health_check()
11637 fw_health->tmr_counter--; in bnxt_fw_health_check()
11642 if (val == fw_health->last_fw_heartbeat) { in bnxt_fw_health_check()
11643 fw_health->arrests++; in bnxt_fw_health_check()
11647 fw_health->last_fw_heartbeat = val; in bnxt_fw_health_check()
11650 if (val != fw_health->last_fw_reset_cnt) { in bnxt_fw_health_check()
11651 fw_health->discoveries++; in bnxt_fw_health_check()
11655 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_fw_health_check()
11826 struct bnxt_fw_health *fw_health = bp->fw_health; in is_bnxt_fw_ok() local
11831 if (val == fw_health->last_fw_heartbeat) in is_bnxt_fw_ok()
11835 if (val != fw_health->last_fw_reset_cnt) in is_bnxt_fw_ok()
11847 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_force_fw_reset() local
11863 wait_dsecs = fw_health->master_func_wait_dsecs; in bnxt_force_fw_reset()
11864 if (fw_health->primary) { in bnxt_force_fw_reset()
11865 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) in bnxt_force_fw_reset()
11870 wait_dsecs = fw_health->normal_func_wait_dsecs; in bnxt_force_fw_reset()
11874 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; in bnxt_force_fw_reset()
11875 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; in bnxt_force_fw_reset()
12034 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_echo_reply() local
12041 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1); in bnxt_fw_echo_reply()
12042 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2); in bnxt_fw_echo_reply()
12386 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_reset_writel() local
12387 u32 reg = fw_health->fw_reset_seq_regs[reg_idx]; in bnxt_fw_reset_writel()
12388 u32 val = fw_health->fw_reset_seq_vals[reg_idx]; in bnxt_fw_reset_writel()
12391 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx]; in bnxt_fw_reset_writel()
12439 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_reset_all() local
12448 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) { in bnxt_reset_all()
12449 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) in bnxt_reset_all()
12451 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) { in bnxt_reset_all()
12545 if (!bp->fw_health->primary) { in bnxt_fw_reset_task()
12546 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; in bnxt_fw_reset_task()
12618 bp->fw_health->enabled) { in bnxt_fw_reset_task()
12619 bp->fw_health->last_fw_reset_cnt = in bnxt_fw_reset_task()
12642 if (bp->fw_health->status_reliable || in bnxt_fw_reset_task()
13210 kfree(bp->fw_health); in bnxt_remove_one()
13211 bp->fw_health = NULL; in bnxt_remove_one()
13806 kfree(bp->fw_health); in bnxt_init_one()
13807 bp->fw_health = NULL; in bnxt_init_one()