Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp91318pxb; Thu, 14 Jan 2021 00:20:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzaVur9YLGPjBVnKRq3P/l28VTHHZ6EaNTEE2hwLDkb1j6LO4EpU4ZZSsYRzj9BHPmLoGo X-Received: by 2002:a05:6402:139a:: with SMTP id b26mr4895136edv.47.1610612404309; Thu, 14 Jan 2021 00:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610612404; cv=none; d=google.com; s=arc-20160816; b=tWl5rkcotRiouUdJ1XDgosUg7GNHTiWuXw9qNmEbMV63ttwE1HPIxs+48EiiH94X7o WE//GUXqj7TCk4gL0tKB8QS0eCh+ZEpaOkurAdD5jhev5kWJpqcvR8u1OBjsnO50jrvx PqUG63JXU2Vd5QiKL6ulXnGi/0It7cDD4v8lPihULQVddKBSSTQjrIxr3/jyXspGHln2 SuVwXhg/vikC8U+tpuEY5M05fSfO6C/c9IHO0ZcGVX+Q1fp8NQE6aczimLOl6VXzuBMm Cn8+gwmqWCmn/5b0CcZsiaKq4dAX9cIObe7hSkAG7EpQUbxVB4eGKWZJ8xD80vyU2N9b GPIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=3wv+4mdMZCnzAE7mwqVbggTrPsKI3A70qMD4iEVy3ww=; b=VPLKIbL6LHALYDKNTnkhOmwb/JhsZsE2I6a9Gd7Uz59Yk7p0NSCpVb5ycqc+TYJqHs 1AQPygbPk9aNhGK+S5RZATXgfLJd/SIeJDqDyVy5OglQhzS7LquCqy7IjYOOPlz41klJ zE5BIwq7L0/jFdOQxXBOSQLOiqQOqgsWkwoIgxqUTzOel3317iZpN9IT8/jf4/kXXOya dDFpzvp5WGeWni1r58ykvUxtjoHZabTOLvcZnJYErvAULD447AuNWwyKahP5AhcyqPrQ k0cwui8NXWwcCStC8+4Osvv15Glao7Al+QvyPYvUtrRccvqifJ15tY2sw5YsZ8w+JC6E mTsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si2128297ejf.3.2021.01.14.00.19.40; Thu, 14 Jan 2021 00:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbhANISr (ORCPT + 99 others); Thu, 14 Jan 2021 03:18:47 -0500 Received: from inva020.nxp.com ([92.121.34.13]:40862 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbhANISq (ORCPT ); Thu, 14 Jan 2021 03:18:46 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 23FD81A11DA; Thu, 14 Jan 2021 09:18:00 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C9A3F1A0841; Thu, 14 Jan 2021 09:17:57 +0100 (CET) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 729344029B; Thu, 14 Jan 2021 09:17:54 +0100 (CET) From: Qiang Zhao To: wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Zhao Qiang Subject: [PATCH] watchdog: stop wdd when watchdog hw running in reboot_notifier Date: Thu, 14 Jan 2021 16:26:51 +0800 Message-Id: <20210114082651.17162-1-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhao Qiang In watchdog_reboot_notifier, wdd should be stopped when the device is in hw_running state Signed-off-by: Zhao Qiang --- drivers/watchdog/watchdog_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index 861daf4..ec670cc 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -154,7 +154,7 @@ static int watchdog_reboot_notifier(struct notifier_block *nb, wdd = container_of(nb, struct watchdog_device, reboot_nb); if (code == SYS_DOWN || code == SYS_HALT) { - if (watchdog_active(wdd)) { + if (watchdog_active(wdd) || watchdog_hw_running(wdd)) { int ret; ret = wdd->ops->stop(wdd); -- 2.7.4