u16 event_type = ((ctl & EQ_CTL_EVENT_TYPE_MASK)
>> EQ_CTL_EVENT_TYPE_SHIFT);
u8 cause;
- bool soft_reset_required;
+ bool reset_required;
gaudi->events_stat[event_type]++;
gaudi->events_stat_aggregate[event_type]++;
case GAUDI_EVENT_TPC6_DEC:
case GAUDI_EVENT_TPC7_DEC:
gaudi_print_irq_info(hdev, event_type, true);
- soft_reset_required = gaudi_tpc_read_interrupts(hdev,
+ reset_required = gaudi_tpc_read_interrupts(hdev,
tpc_dec_event_to_tpc_id(event_type),
"AXI_SLV_DEC_Error");
- if (soft_reset_required) {
- dev_err_ratelimited(hdev->dev,
- "soft reset required due to %s\n",
- gaudi_irq_map_table[event_type].name);
- hl_device_reset(hdev, false, false);
+ if (reset_required) {
+ dev_err(hdev->dev, "hard reset required due to %s\n",
+ gaudi_irq_map_table[event_type].name);
+
+ if (hdev->hard_reset_on_fw_events)
+ hl_device_reset(hdev, true, false);
+ } else {
+ hl_fw_unmask_irq(hdev, event_type);
}
- hl_fw_unmask_irq(hdev, event_type);
break;
case GAUDI_EVENT_TPC0_KRN_ERR:
case GAUDI_EVENT_TPC6_KRN_ERR:
case GAUDI_EVENT_TPC7_KRN_ERR:
gaudi_print_irq_info(hdev, event_type, true);
- soft_reset_required = gaudi_tpc_read_interrupts(hdev,
+ reset_required = gaudi_tpc_read_interrupts(hdev,
tpc_krn_event_to_tpc_id(event_type),
"KRN_ERR");
- if (soft_reset_required) {
- dev_err_ratelimited(hdev->dev,
- "soft reset required due to %s\n",
- gaudi_irq_map_table[event_type].name);
- hl_device_reset(hdev, false, false);
+ if (reset_required) {
+ dev_err(hdev->dev, "hard reset required due to %s\n",
+ gaudi_irq_map_table[event_type].name);
+
+ if (hdev->hard_reset_on_fw_events)
+ hl_device_reset(hdev, true, false);
+ } else {
+ hl_fw_unmask_irq(hdev, event_type);
}
- hl_fw_unmask_irq(hdev, event_type);
break;
case GAUDI_EVENT_PCIE_CORE_SERR:
case GAUDI_EVENT_RAZWI_OR_ADC_SW:
gaudi_print_irq_info(hdev, event_type, true);
- hl_device_reset(hdev, false, false);
- hl_fw_unmask_irq(hdev, event_type);
+ if (hdev->hard_reset_on_fw_events)
+ hl_device_reset(hdev, true, false);
break;
case GAUDI_EVENT_TPC0_BMON_SPMU: