Lines Matching defs:fw_health

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