habanalabs/gaudi: use graceful hard reset for F/W events

Use graceful hard reset for F/W events on Gaudi device that require a
device reset.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
Tomer Tayar 2022-09-30 16:43:47 +03:00 committed by Oded Gabbay
parent 11669b58fa
commit 5b8873b39c

View File

@ -7942,16 +7942,14 @@ static void gaudi_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entr
reset_required = false;
}
/* despite reset doesn't execute. a notification on
* occurred event needs to be sent here
*/
if (event_mask)
hl_notifier_event_send_all(hdev, event_mask);
if (reset_required)
hl_device_reset(hdev, flags);
else
if (reset_required) {
hl_device_cond_reset(hdev, flags, event_mask);
} else {
hl_fw_unmask_irq(hdev, event_type);
/* Notification on occurred event needs to be sent although reset is not executed */
if (event_mask)
hl_notifier_event_send_all(hdev, event_mask);
}
}
static void *gaudi_get_events_stat(struct hl_device *hdev, bool aggregate, u32 *size)