From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] habanalabs: prevent false heartbeat message
Date: Mon, 15 Nov 2021 13:05:18 +0200 [thread overview]
Message-ID: <20211115110521.783103-4-ogabbay@kernel.org> (raw)
In-Reply-To: <20211115110521.783103-1-ogabbay@kernel.org>
If a device reset has started, there is a chance that the heartbeat
function will fail because the device is disabled at the beginning
of the reset function.
In that case, we don't want the error message to appear in the log.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
drivers/misc/habanalabs/common/device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index 0da5a55490ff..ca74d7815a67 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -543,7 +543,9 @@ static void hl_device_heartbeat(struct work_struct *work)
if (!hdev->asic_funcs->send_heartbeat(hdev))
goto reschedule;
- dev_err(hdev->dev, "Device heartbeat failed!\n");
+ if (hl_device_operational(hdev, NULL))
+ dev_err(hdev->dev, "Device heartbeat failed!\n");
+
hl_device_reset(hdev, HL_DRV_RESET_HARD | HL_DRV_RESET_HEARTBEAT);
return;
--
2.25.1
next prev parent reply other threads:[~2021-11-15 11:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 11:05 [PATCH 1/7] habanalabs: debugfs support for larger I2C transactions Oded Gabbay
2021-11-15 11:05 ` [PATCH 2/7] habanalabs: handle device TPM boot error as warning Oded Gabbay
2021-11-15 11:05 ` [PATCH 3/7] habanalabs: add support for fetching historic errors Oded Gabbay
2021-11-15 11:05 ` Oded Gabbay [this message]
2021-11-15 11:05 ` [PATCH 5/7] habanalabs: align debugfs documentation to alphabetical order Oded Gabbay
2021-11-15 11:05 ` [PATCH 6/7] habanalabs: skip PLL freq fetch Oded Gabbay
2021-11-15 11:05 ` [PATCH 7/7] habanalabs: fix possible deadlock in cache invl failure 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=20211115110521.783103-4-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox