All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: linux-kernel@vger.kernel.org, SW_Drivers@habana.ai
Subject: [PATCH 6/6] habanalabs: check flag before reset because of f/w event
Date: Fri,  4 Sep 2020 21:46:23 +0300	[thread overview]
Message-ID: <20200904184623.13478-6-oded.gabbay@gmail.com> (raw)
In-Reply-To: <20200904184623.13478-1-oded.gabbay@gmail.com>

For consistency with GAUDI code, add check of the relevant flag in the
device structure before resetting the GOYA device in case of firmware
event.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
 drivers/misc/habanalabs/goya/goya.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index 804c83eb12b7..46a900fb3ef8 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -4644,7 +4644,8 @@ void goya_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entry)
 	case GOYA_ASYNC_EVENT_ID_L2_RAM_ECC:
 	case GOYA_ASYNC_EVENT_ID_PSOC_GPIO_05_SW_RESET:
 		goya_print_irq_info(hdev, event_type, false);
-		hl_device_reset(hdev, true, false);
+		if (hdev->hard_reset_on_fw_events)
+			hl_device_reset(hdev, true, false);
 		break;
 
 	case GOYA_ASYNC_EVENT_ID_PCIE_DEC:
-- 
2.17.1


  parent reply	other threads:[~2020-09-04 18:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 18:46 [PATCH 1/6] habanalabs: rename ArmCP to CPU-CP Oded Gabbay
2020-09-04 18:46 ` [PATCH 2/6] habanalabs: remove unused ASIC function pointer Oded Gabbay
2020-09-04 18:46 ` [PATCH 3/6] habanalabs: remove unused define Oded Gabbay
2020-09-04 18:46 ` [PATCH 4/6] habanalabs: Fix alignment issue in cpucp_info structure Oded Gabbay
2020-09-04 18:46 ` [PATCH 5/6] habanalabs: increase PQ COMP_OFFSET by one nibble Oded Gabbay
2020-09-04 18:46 ` Oded Gabbay [this message]
2020-09-07 15:20   ` [PATCH 6/6] habanalabs: check flag before reset because of f/w event Tomer Tayar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200904184623.13478-6-oded.gabbay@gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=SW_Drivers@habana.ai \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.