Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp408614ybb; Sat, 28 Mar 2020 01:53:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuZ0W/v0qN7jO3BDk0Wji2icurvJA/80wP3JPTjgjJA0rjDelNMCr0ytXKWGeh8peE0ouqr X-Received: by 2002:a54:4e13:: with SMTP id a19mr1869820oiy.108.1585385637834; Sat, 28 Mar 2020 01:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585385637; cv=none; d=google.com; s=arc-20160816; b=WhNtxLDbjqMUENcpXuzZVgQEjUVVVWo5HxTQAxiEmUxlAZTQ1kM23ZW9XdS6X8I6tY Ao9CX7xOu94oTdXND89r6Vrm2twMuggs93Jd0iB/3Q3D+Ti32SwtTk3TBsY8nLAR/adU 4Nu5YsNQejPsDbV2unKk8rydtrJqimirSycK5i0Uso2TCjKj924n/6BWJccdL5pFjcJT I4mPxgGzG8D1eo4Iw3yusRhLWMDrign+NtKNxACOyzRXySAoQElk2BZPRcyD3HAiU5k4 tjGpH2QWY6khL2idxMKUTwOoEjomsrOBJVEIQJtlSAkyz4/r08ODLsgn2go6IpziovCc 7vaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=nnCKRfRYRVtQ8LCYwwqPwbfqWqGkXGfrBnpMFb83p/0=; b=ixBTgK2MISJPnjFZku9nqh7/rAu/UzLOgmKrks7EdMxYweINz4W3/tyJKTjxezKrCP oHiLrKxebdhLlHuVMK9oEnNzBh06NbaGW3/HZRazHRio9QZmoY5NmdKJPNu+kHqoJohf Z23sKJRr6aOf3JFnt1Flficq1WgbWjDKzUw5y7CzuWNA0vmXjWoSxefL5FjBsxxkQnWm gY5tHact4JsFPvNQ1o6NZ2PzLB5p/i0XMckpcmUlS4E6ubr15a3jhC3c1vtf0wdW9Kwk s1BztV5KMnD+LnQlDC4wv4fAX0g3Zuu+vfFJLxleKohfbX2aOa6klvlvnUG8A4D7Hh9o rvGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AEmiAiE+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si3309967oip.112.2020.03.28.01.53.45; Sat, 28 Mar 2020 01:53:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AEmiAiE+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727148AbgC1Iwy (ORCPT + 99 others); Sat, 28 Mar 2020 04:52:54 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55610 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbgC1Iww (ORCPT ); Sat, 28 Mar 2020 04:52:52 -0400 Received: by mail-wm1-f66.google.com with SMTP id z5so14086918wml.5 for ; Sat, 28 Mar 2020 01:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nnCKRfRYRVtQ8LCYwwqPwbfqWqGkXGfrBnpMFb83p/0=; b=AEmiAiE+gXoOFUd/+f6z1lJgmklaBWp7mSYZAcf1oHaH6nIpLr5uPH7Dt/K2nnofWP NQrD1gBuhHQ3WgJOThcjfwEF2kxSprkzKybcUgayXPlkQDON9XZxPGuUMvxonWLGHSEl uMQKocKbTVKATxN4vQiISNPnGc6o69lB2x/Mgqk4z05RdtTfI2LPZG6o7jENB7o0J0Nz gtlCHywyRdjHAHkj8Z7h2wHFPlK9iBNRRuu383YEYkoAiVSGObtcbsQGQQVcN7nou+SC Djl8wcoIxgGz6sYMDdaaDeGZsCdABLjIIte4UMbOewFh92xn8mrBuiyB7EB5/Zc6hURB yAvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nnCKRfRYRVtQ8LCYwwqPwbfqWqGkXGfrBnpMFb83p/0=; b=QS4BrnTCOk+GqgwdYiPJ+YgTNRMyIOLMwlAvGuXv7kl4S2bhOCYCq4Hrp1KK9X2UHu m7greuzoNDQsmwBKLfRB8o5hexpgSH6bejzSr4zMavg48bNVndi5VA1L2tTZN0Fhqz47 LjM+eNPYVWMbPhM2Nzgi5napP+kSLeXW7Q+AxVe9495D22iG5kk/Lb4D5OOPW5vFkssc VjjkJWhkGl1a3T/fmSsfJDMbr8pkUpF7lUAPg9tStEcPj6ZpXX8wjgFlUGLv8Qp6/y3L ON4sPgH8PHCHERDV1flF3UQb5h/1PPai7vam04pepwXFsaVhDOCEa3gHlF3sRH9S5qqb OZsA== X-Gm-Message-State: ANhLgQ1+fbvlh3DTKp+29yVQdXVFK+LLHjDFXsIXE9FkqiGeIJunp/K6 ZdfeYkx3UG/rWh+uK0YH8xotyGYj X-Received: by 2002:a05:600c:da:: with SMTP id u26mr2986988wmm.117.1585385570019; Sat, 28 Mar 2020 01:52:50 -0700 (PDT) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id k15sm11908683wrm.55.2020.03.28.01.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 01:52:49 -0700 (PDT) From: Oded Gabbay 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 Message-Id: <20200328085238.3428-5-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200328085238.3428-1-oded.gabbay@gmail.com> References: <20200328085238.3428-1-oded.gabbay@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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