Lines Matching refs:fw_health
2123 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_readl() local
2124 u32 reg = fw_health->regs[reg_idx]; in bnxt_fw_health_readl()
2134 reg_off = fw_health->mapped_regs[reg_idx]; in bnxt_fw_health_readl()
2144 val &= fw_health->fw_reset_inprog_reg_mask; in bnxt_fw_health_readl()
2268 if (!bp->fw_health) in bnxt_async_event_process()
2282 bp->fw_health->fatalities++; in bnxt_async_event_process()
2287 bp->fw_health->survivals++; in bnxt_async_event_process()
2299 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2303 if (!fw_health) in bnxt_async_event_process()
2307 fw_health->enabled = false; in bnxt_async_event_process()
2311 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1); in bnxt_async_event_process()
2312 fw_health->tmr_multiplier = in bnxt_async_event_process()
2313 DIV_ROUND_UP(fw_health->polling_dsecs * HZ, in bnxt_async_event_process()
2315 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_async_event_process()
2316 if (!fw_health->enabled) in bnxt_async_event_process()
2317 fw_health->last_fw_heartbeat = in bnxt_async_event_process()
2319 fw_health->last_fw_reset_cnt = in bnxt_async_event_process()
2326 fw_health->primary ? "primary" : "backup", status, in bnxt_async_event_process()
2327 status_desc, fw_health->last_fw_reset_cnt); in bnxt_async_event_process()
2328 if (!fw_health->enabled) { in bnxt_async_event_process()
2333 fw_health->enabled = true; in bnxt_async_event_process()
2365 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_async_event_process() local
2370 if (fw_health) { in bnxt_async_event_process()
2371 fw_health->echo_req_data1 = data1; in bnxt_async_event_process()
2372 fw_health->echo_req_data2 = data2; in bnxt_async_event_process()
7845 if (bp->fw_health) in __bnxt_alloc_fw_health()
7848 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); in __bnxt_alloc_fw_health()
7849 if (!bp->fw_health) in __bnxt_alloc_fw_health()
7852 mutex_init(&bp->fw_health->lock); in __bnxt_alloc_fw_health()
7883 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_inv_fw_health_reg() local
7886 if (!fw_health) in bnxt_inv_fw_health_reg()
7889 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]); in bnxt_inv_fw_health_reg()
7891 fw_health->status_reliable = false; in bnxt_inv_fw_health_reg()
7893 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]); in bnxt_inv_fw_health_reg()
7895 fw_health->resets_reliable = false; in bnxt_inv_fw_health_reg()
7905 if (bp->fw_health) in bnxt_try_map_fw_health_reg()
7906 bp->fw_health->status_reliable = false; in bnxt_try_map_fw_health_reg()
7934 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc; in bnxt_try_map_fw_health_reg()
7938 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] = in bnxt_try_map_fw_health_reg()
7942 bp->fw_health->status_reliable = true; in bnxt_try_map_fw_health_reg()
7947 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_map_fw_health_regs() local
7951 bp->fw_health->status_reliable = false; in bnxt_map_fw_health_regs()
7952 bp->fw_health->resets_reliable = false; in bnxt_map_fw_health_regs()
7955 u32 reg = fw_health->regs[i]; in bnxt_map_fw_health_regs()
7963 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg); in bnxt_map_fw_health_regs()
7965 bp->fw_health->status_reliable = true; in bnxt_map_fw_health_regs()
7966 bp->fw_health->resets_reliable = true; in bnxt_map_fw_health_regs()
7976 if (!bp->fw_health) in bnxt_remap_fw_health_regs()
7980 bp->fw_health->status_reliable = true; in bnxt_remap_fw_health_regs()
7981 bp->fw_health->resets_reliable = true; in bnxt_remap_fw_health_regs()
7989 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_hwrm_error_recovery_qcfg() local
8005 fw_health->flags = le32_to_cpu(resp->flags); in bnxt_hwrm_error_recovery_qcfg()
8006 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) && in bnxt_hwrm_error_recovery_qcfg()
8011 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq); in bnxt_hwrm_error_recovery_qcfg()
8012 fw_health->master_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8014 fw_health->normal_func_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8016 fw_health->post_reset_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8018 fw_health->post_reset_max_wait_dsecs = in bnxt_hwrm_error_recovery_qcfg()
8020 fw_health->regs[BNXT_FW_HEALTH_REG] = in bnxt_hwrm_error_recovery_qcfg()
8022 fw_health->regs[BNXT_FW_HEARTBEAT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8024 fw_health->regs[BNXT_FW_RESET_CNT_REG] = in bnxt_hwrm_error_recovery_qcfg()
8026 fw_health->regs[BNXT_FW_RESET_INPROG_REG] = in bnxt_hwrm_error_recovery_qcfg()
8028 fw_health->fw_reset_inprog_reg_mask = in bnxt_hwrm_error_recovery_qcfg()
8030 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt; in bnxt_hwrm_error_recovery_qcfg()
8031 if (fw_health->fw_reset_seq_cnt >= 16) { in bnxt_hwrm_error_recovery_qcfg()
8035 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) { in bnxt_hwrm_error_recovery_qcfg()
8036 fw_health->fw_reset_seq_regs[i] = in bnxt_hwrm_error_recovery_qcfg()
8038 fw_health->fw_reset_seq_vals[i] = in bnxt_hwrm_error_recovery_qcfg()
8040 fw_health->fw_reset_seq_delay_msec[i] = in bnxt_hwrm_error_recovery_qcfg()
9957 if (bp->fw_health && bp->fw_health->status_reliable) { in bnxt_try_recover_fw()
11568 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_health_check() local
11571 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) in bnxt_fw_health_check()
11576 if (fw_health->tmr_counter) { in bnxt_fw_health_check()
11577 fw_health->tmr_counter--; in bnxt_fw_health_check()
11582 if (val == fw_health->last_fw_heartbeat) { in bnxt_fw_health_check()
11583 fw_health->arrests++; in bnxt_fw_health_check()
11587 fw_health->last_fw_heartbeat = val; in bnxt_fw_health_check()
11590 if (val != fw_health->last_fw_reset_cnt) { in bnxt_fw_health_check()
11591 fw_health->discoveries++; in bnxt_fw_health_check()
11595 fw_health->tmr_counter = fw_health->tmr_multiplier; in bnxt_fw_health_check()
11766 struct bnxt_fw_health *fw_health = bp->fw_health; in is_bnxt_fw_ok() local
11771 if (val == fw_health->last_fw_heartbeat) in is_bnxt_fw_ok()
11775 if (val != fw_health->last_fw_reset_cnt) in is_bnxt_fw_ok()
11787 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_force_fw_reset() local
11803 wait_dsecs = fw_health->master_func_wait_dsecs; in bnxt_force_fw_reset()
11804 if (fw_health->primary) { in bnxt_force_fw_reset()
11805 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) in bnxt_force_fw_reset()
11810 wait_dsecs = fw_health->normal_func_wait_dsecs; in bnxt_force_fw_reset()
11814 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; in bnxt_force_fw_reset()
11815 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; in bnxt_force_fw_reset()
11974 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_echo_reply() local
11981 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1); in bnxt_fw_echo_reply()
11982 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2); in bnxt_fw_echo_reply()
12324 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_fw_reset_writel() local
12325 u32 reg = fw_health->fw_reset_seq_regs[reg_idx]; in bnxt_fw_reset_writel()
12326 u32 val = fw_health->fw_reset_seq_vals[reg_idx]; in bnxt_fw_reset_writel()
12329 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx]; in bnxt_fw_reset_writel()
12377 struct bnxt_fw_health *fw_health = bp->fw_health; in bnxt_reset_all() local
12386 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) { in bnxt_reset_all()
12387 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) in bnxt_reset_all()
12389 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) { in bnxt_reset_all()
12483 if (!bp->fw_health->primary) { in bnxt_fw_reset_task()
12484 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; in bnxt_fw_reset_task()
12556 bp->fw_health->enabled) { in bnxt_fw_reset_task()
12557 bp->fw_health->last_fw_reset_cnt = in bnxt_fw_reset_task()
12580 if (bp->fw_health->status_reliable || in bnxt_fw_reset_task()
13159 kfree(bp->fw_health); in bnxt_remove_one()
13160 bp->fw_health = NULL; in bnxt_remove_one()
13746 kfree(bp->fw_health); in bnxt_init_one()
13747 bp->fw_health = NULL; in bnxt_init_one()