summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2021-03-03 13:23:47 +0200
committerOded Gabbay <ogabbay@kernel.org>2021-04-09 14:09:23 +0300
commit2ea09537ad7747944c20ff70078be304a71b3e33 (patch)
tree3e6cab5c4e642f8ad627f18f5c8c9217c3b64d21 /drivers
parenta5778d10a12da26de55f88a9d03cbea78f73f8c4 (diff)
downloadlinux-2ea09537ad7747944c20ff70078be304a71b3e33.tar.bz2
habanalabs/gaudi: reset device upon BMC request
In case the BMC of the devices' box wants to initiate a reset of a specific device, it must go through driver. Once driver will receive the request it will initiate a hard reset flow. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/habanalabs/gaudi/gaudi.c4
-rw-r--r--drivers/misc/habanalabs/include/gaudi/gaudi_async_events.h1
-rw-r--r--drivers/misc/habanalabs/include/gaudi/gaudi_async_ids_map_extended.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index 8be75f7c97f8..099c51350be6 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -7575,6 +7575,10 @@ static void gaudi_handle_eqe(struct hl_device *hdev,
event_type, cause);
break;
+ case GAUDI_EVENT_BMC_RESET_CMD:
+ gaudi_print_irq_info(hdev, event_type, false);
+ goto reset_device;
+
case GAUDI_EVENT_PKT_QUEUE_OUT_SYNC:
gaudi_print_irq_info(hdev, event_type, false);
gaudi_print_out_of_sync_info(hdev, &eq_entry->pkt_sync_err);
diff --git a/drivers/misc/habanalabs/include/gaudi/gaudi_async_events.h b/drivers/misc/habanalabs/include/gaudi/gaudi_async_events.h
index 0a0fa57024f8..25f835ba2cd6 100644
--- a/drivers/misc/habanalabs/include/gaudi/gaudi_async_events.h
+++ b/drivers/misc/habanalabs/include/gaudi/gaudi_async_events.h
@@ -303,6 +303,7 @@ enum gaudi_async_event_id {
GAUDI_EVENT_NIC3_QP1 = 619,
GAUDI_EVENT_NIC4_QP0 = 620,
GAUDI_EVENT_NIC4_QP1 = 621,
+ GAUDI_EVENT_BMC_RESET_CMD = 646,
GAUDI_EVENT_PKT_QUEUE_OUT_SYNC = 647,
GAUDI_EVENT_FIX_POWER_ENV_S = 658,
GAUDI_EVENT_FIX_POWER_ENV_E = 659,
diff --git a/drivers/misc/habanalabs/include/gaudi/gaudi_async_ids_map_extended.h b/drivers/misc/habanalabs/include/gaudi/gaudi_async_ids_map_extended.h
index 9106395eb920..079be1fb8f70 100644
--- a/drivers/misc/habanalabs/include/gaudi/gaudi_async_ids_map_extended.h
+++ b/drivers/misc/habanalabs/include/gaudi/gaudi_async_ids_map_extended.h
@@ -670,7 +670,7 @@ static struct gaudi_async_events_ids_map gaudi_irq_map_table[] = {
{ .fc_id = 643, .cpu_id = 492, .valid = 0, .name = "" },
{ .fc_id = 644, .cpu_id = 493, .valid = 0, .name = "" },
{ .fc_id = 645, .cpu_id = 494, .valid = 0, .name = "" },
- { .fc_id = 646, .cpu_id = 495, .valid = 0, .name = "" },
+ { .fc_id = 646, .cpu_id = 495, .valid = 1, .name = "BMC_RST_CMD" },
{ .fc_id = 647, .cpu_id = 496, .valid = 0, .name = "" },
{ .fc_id = 648, .cpu_id = 497, .valid = 0, .name = "" },
{ .fc_id = 649, .cpu_id = 498, .valid = 0, .name = "" },