mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Tomer Tayar <ttayar@habana.ai>
Subject: [PATCH 08/10] habanalabs: run error handling if scrub_device_mem fails after reset
Date: Thu, 19 Jan 2023 12:33:37 +0200	[thread overview]
Message-ID: <20230119103339.718430-8-ogabbay@kernel.org> (raw)
In-Reply-To: <20230119103339.718430-1-ogabbay@kernel.org>

From: Tomer Tayar <ttayar@habana.ai>

If device memory scrubbing from hl_device_reset() fails, we return with
an error code but not perform error handling code.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/accel/habanalabs/common/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 9a9c494b08a4..edeec35fd9c6 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -1738,7 +1738,7 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
 	rc = hdev->asic_funcs->scrub_device_mem(hdev);
 	if (rc) {
 		dev_err(hdev->dev, "scrub mem failed from device reset (%d)\n", rc);
-		return rc;
+		goto out_err;
 	}
 
 	spin_lock(&hdev->reset_info.lock);
-- 
2.25.1


  parent reply	other threads:[~2023-01-19 10:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 10:33 [PATCH 01/10] habanalabs: update device status sysfs documentation Oded Gabbay
2023-01-19 10:33 ` [PATCH 02/10] habanalabs/gaudi2: print page fault axi transaction id Oded Gabbay
2023-01-19 10:33 ` [PATCH 03/10] habanalabs: block soft-reset on an unusable device Oded Gabbay
2023-01-19 10:33 ` [PATCH 04/10] habanalabs/gaudi2: fix emda range registers razwi handling Oded Gabbay
2023-01-19 10:33 ` [PATCH 05/10] habanalabs: refactor user interrupt type Oded Gabbay
2023-01-19 10:33 ` [PATCH 06/10] habanalabs: optimize command submission completion timestamp Oded Gabbay
2023-01-19 10:33 ` [PATCH 07/10] habanalabs: enhance info printed on FW load errors Oded Gabbay
2023-01-19 10:33 ` Oded Gabbay [this message]
2023-01-19 10:33 ` [PATCH 09/10] habanalabs: clear in_compute_reset when escalating to hard reset Oded Gabbay
2023-01-19 10:33 ` [PATCH 10/10] habanalabs/gaudi2: unsecure tpc kernel_config registers Oded Gabbay

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=20230119103339.718430-8-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ttayar@habana.ai \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®