Lines Matching defs:fw_health
2415 struct bnxt_fw_health *fw_health = bp->fw_health;
2416 u32 reg = fw_health->regs[reg_idx];
2426 reg_off = fw_health->mapped_regs[reg_idx];
2436 val &= fw_health->fw_reset_inprog_reg_mask;
2765 if (!bp->fw_health)
2779 bp->fw_health->fatalities++;
2784 bp->fw_health->survivals++;
2796 struct bnxt_fw_health *fw_health = bp->fw_health;
2800 if (!fw_health)
2804 fw_health->enabled = false;
2808 fw_health->primary = EVENT_DATA1_RECOVERY_MASTER_FUNC(data1);
2809 fw_health->tmr_multiplier =
2810 DIV_ROUND_UP(fw_health->polling_dsecs * HZ,
2812 fw_health->tmr_counter = fw_health->tmr_multiplier;
2813 if (!fw_health->enabled)
2814 fw_health->last_fw_heartbeat =
2816 fw_health->last_fw_reset_cnt =
2823 fw_health->primary ? "primary" : "backup", status,
2824 status_desc, fw_health->last_fw_reset_cnt);
2825 if (!fw_health->enabled) {
2830 fw_health->enabled = true;
2862 struct bnxt_fw_health *fw_health = bp->fw_health;
2867 if (fw_health) {
2868 fw_health->echo_req_data1 = data1;
2869 fw_health->echo_req_data2 = data2;
9841 if (bp->fw_health)
9844 bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL);
9845 if (!bp->fw_health)
9848 mutex_init(&bp->fw_health->lock);
9879 struct bnxt_fw_health *fw_health = bp->fw_health;
9882 if (!fw_health)
9885 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_HEALTH_REG]);
9887 fw_health->status_reliable = false;
9889 reg_type = BNXT_FW_HEALTH_REG_TYPE(fw_health->regs[BNXT_FW_RESET_CNT_REG]);
9891 fw_health->resets_reliable = false;
9901 if (bp->fw_health)
9902 bp->fw_health->status_reliable = false;
9930 bp->fw_health->regs[BNXT_FW_HEALTH_REG] = status_loc;
9934 bp->fw_health->mapped_regs[BNXT_FW_HEALTH_REG] =
9938 bp->fw_health->status_reliable = true;
9943 struct bnxt_fw_health *fw_health = bp->fw_health;
9947 bp->fw_health->status_reliable = false;
9948 bp->fw_health->resets_reliable = false;
9951 u32 reg = fw_health->regs[i];
9959 fw_health->mapped_regs[i] = BNXT_FW_HEALTH_WIN_OFF(reg);
9961 bp->fw_health->status_reliable = true;
9962 bp->fw_health->resets_reliable = true;
9972 if (!bp->fw_health)
9976 bp->fw_health->status_reliable = true;
9977 bp->fw_health->resets_reliable = true;
9985 struct bnxt_fw_health *fw_health = bp->fw_health;
10001 fw_health->flags = le32_to_cpu(resp->flags);
10002 if ((fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) &&
10007 fw_health->polling_dsecs = le32_to_cpu(resp->driver_polling_freq);
10008 fw_health->master_func_wait_dsecs =
10010 fw_health->normal_func_wait_dsecs =
10012 fw_health->post_reset_wait_dsecs =
10014 fw_health->post_reset_max_wait_dsecs =
10016 fw_health->regs[BNXT_FW_HEALTH_REG] =
10018 fw_health->regs[BNXT_FW_HEARTBEAT_REG] =
10020 fw_health->regs[BNXT_FW_RESET_CNT_REG] =
10022 fw_health->regs[BNXT_FW_RESET_INPROG_REG] =
10024 fw_health->fw_reset_inprog_reg_mask =
10026 fw_health->fw_reset_seq_cnt = resp->reg_array_cnt;
10027 if (fw_health->fw_reset_seq_cnt >= 16) {
10031 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++) {
10032 fw_health->fw_reset_seq_regs[i] =
10034 fw_health->fw_reset_seq_vals[i] =
10036 fw_health->fw_reset_seq_delay_msec[i] =
12394 if (bp->fw_health && bp->fw_health->status_reliable) {
14073 struct bnxt_fw_health *fw_health = bp->fw_health;
14077 if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
14082 if (fw_health->tmr_counter) {
14083 fw_health->tmr_counter--;
14088 if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) {
14089 fw_health->arrests++;
14093 fw_health->last_fw_heartbeat = val;
14096 if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) {
14097 fw_health->discoveries++;
14101 fw_health->tmr_counter = fw_health->tmr_multiplier;
14263 struct bnxt_fw_health *fw_health = bp->fw_health;
14268 if (val == fw_health->last_fw_heartbeat)
14272 if (val != fw_health->last_fw_reset_cnt)
14284 struct bnxt_fw_health *fw_health = bp->fw_health;
14303 wait_dsecs = fw_health->master_func_wait_dsecs;
14304 if (fw_health->primary) {
14305 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU)
14310 wait_dsecs = fw_health->normal_func_wait_dsecs;
14314 bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs;
14315 bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs;
14471 struct bnxt_fw_health *fw_health = bp->fw_health;
14478 req->event_data1 = cpu_to_le32(fw_health->echo_req_data1);
14479 req->event_data2 = cpu_to_le32(fw_health->echo_req_data2);
14900 struct bnxt_fw_health *fw_health = bp->fw_health;
14901 u32 reg = fw_health->fw_reset_seq_regs[reg_idx];
14902 u32 val = fw_health->fw_reset_seq_vals[reg_idx];
14905 delay_msecs = fw_health->fw_reset_seq_delay_msec[reg_idx];
14953 struct bnxt_fw_health *fw_health = bp->fw_health;
14962 if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_HOST) {
14963 for (i = 0; i < fw_health->fw_reset_seq_cnt; i++)
14965 } else if (fw_health->flags & ERROR_RECOVERY_QCFG_RESP_FLAGS_CO_CPU) {
15057 if (!bp->fw_health->primary) {
15058 u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs;
15130 bp->fw_health->enabled) {
15131 bp->fw_health->last_fw_reset_cnt =
15156 if (bp->fw_health->status_reliable ||
16185 kfree(bp->fw_health);
16186 bp->fw_health = NULL;
16834 kfree(bp->fw_health);
16835 bp->fw_health = NULL;