mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai, ttayar@habana.ai
Cc: gregkh@linuxfoundation.org
Subject: [PATCH 5/6] habanalabs: print warning when reset is requested
Date: Sat, 28 Mar 2020 11:52:37 +0300	[thread overview]
Message-ID: <20200328085238.3428-5-oded.gabbay@gmail.com> (raw)
In-Reply-To: <20200328085238.3428-1-oded.gabbay@gmail.com>

When the system administrator asks the driver to soft or hard reset the
device through sysfs, the driver should display a warning in the kernel log
to explain why it suddenly resets the device.

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

diff --git a/drivers/misc/habanalabs/sysfs.c b/drivers/misc/habanalabs/sysfs.c
index 4cd622b017b9..e478a191e5f5 100644
--- a/drivers/misc/habanalabs/sysfs.c
+++ b/drivers/misc/habanalabs/sysfs.c
@@ -183,6 +183,8 @@ static ssize_t soft_reset_store(struct device *dev,
 		goto out;
 	}
 
+	dev_warn(hdev->dev, "Soft-Reset requested through sysfs\n");
+
 	hl_device_reset(hdev, false, false);
 
 out:
@@ -204,6 +206,8 @@ static ssize_t hard_reset_store(struct device *dev,
 		goto out;
 	}
 
+	dev_warn(hdev->dev, "Hard-Reset requested through sysfs\n");
+
 	hl_device_reset(hdev, true, false);
 
 out:
-- 
2.17.1


  parent reply	other threads:[~2020-03-28  8:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28  8:52 [PATCH 1/6] habanalabs: don't wait for ASIC CPU after reset Oded Gabbay
2020-03-28  8:52 ` [PATCH 2/6] habanalabs: remove stop-on-error flag from DMA Oded Gabbay
2020-03-28  8:52 ` [PATCH 3/6] habanalabs: re-factor H/W queues initialization Oded Gabbay
2020-03-28  8:52 ` [PATCH 4/6] habanalabs: unify and improve device cpu init Oded Gabbay
2020-03-30  6:07   ` Omer Shpigelman
2020-03-28  8:52 ` Oded Gabbay [this message]
2020-03-30  6:09   ` [PATCH 5/6] habanalabs: print warning when reset is requested Omer Shpigelman
2020-03-28  8:52 ` [PATCH 6/6] habanalabs: increase timeout during reset Oded Gabbay
2020-03-30  6:14   ` Omer Shpigelman
2020-03-30  6:01 ` [PATCH 1/6] habanalabs: don't wait for ASIC CPU after reset Omer Shpigelman

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=20200328085238.3428-5-oded.gabbay@gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oshpigelman@habana.ai \
    --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

Powered by JetHome