Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4456070ybz; Tue, 28 Apr 2020 11:35:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLfR7GzVHJj7o/5pYx9bem8PS78zlftwxKlAzkvomdxxyzZW2cpdqnr5dx+SRsE5E9BhWjt X-Received: by 2002:a17:907:20a2:: with SMTP id pw2mr26571728ejb.252.1588098952549; Tue, 28 Apr 2020 11:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588098952; cv=none; d=google.com; s=arc-20160816; b=HpiJSHtXOCSlMdRdz1la2hCjOiTgKslr9616cChdExguWcR3alcwYYxZcuX30pakDk IDXx+635H4WeHpeULwfcE97TDvMbmOET26UduQxRQjBi/Ri9CA0lh3oOJyAl48RiYXr2 uV9pYQMat+wUnMp41ItPLUIZEFLIupQQbZ0D8/CW8EZ1TZh9sXyzONvTyjbVT7hUgmLJ 14k9aRn2/uKBiojwzNycKlW8Ii0qTHw1LPFfRxnAXWjxMdI78eKdwB9xnd24l/K379y7 Xz3uEatYKxxKjVAPRSs1SWMNGc6iN5qF9b5xqrnQPj6S/UTBWIvBNt9gJZsLStLyyrQe huXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KY2pdY64AqMUz07qZVOtHuV6sBcW4WcSbdRoNeb6Hk4=; b=S/G196QmZVLb6r3A+65/9NsPpgSF6PSySf2RD0PKZbuG88P7j3FwdCoilkYt6c2Qsh suVSg6UiijwBBgc2R8/J/aFL3wxKq868ObRHNWBNI7dTIKMtGfo+HDip34TcicF37zF2 eudxcQ6aP9EjaBUGKeyxbs8jRFalfv2PoEMft8FKsfsHplr3Q5mmzEvxIjb4AcbtON3D 5ic8rBy0Z+Mok3mj1dPD63jISX3+VuCkPPqmG14uMO6G3CfLylt348bZ2jNxouWdm18R zHVUcYoJ7ZMzzr5T0li7EbxK6qXdZZV481JfR0tXTVsQbxMQxT0qOVPjy7DzGCiUcL3e DPcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=so8idE6I; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si2222208eju.4.2020.04.28.11.35.28; Tue, 28 Apr 2020 11:35:52 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=so8idE6I; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728859AbgD1Scs (ORCPT + 99 others); Tue, 28 Apr 2020 14:32:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729847AbgD1Scq (ORCPT ); Tue, 28 Apr 2020 14:32:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 95AE221707; Tue, 28 Apr 2020 18:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588098766; bh=mNN3goFAdj6cbIOVlz0S+XGlyz6dKS6SjydtWTzaTLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=so8idE6I28Sjdt5EeFXqXc348NyBcvbn0OhCSl19Y2Cd5MgGzGoAWjhyiYRpKgP// voNT7UtsHEvCO4qiKb9UnAZV7grqY3Pv6Bm0giYP2a7o2j/ZTLPN3NFz6+wcM2zz6j I0aR1RMtOnH1hJIWMNKAUQHYRzGnT+m8hsB6gqZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tero Kristo , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 5.4 009/168] watchdog: reset last_hw_keepalive time at start Date: Tue, 28 Apr 2020 20:23:03 +0200 Message-Id: <20200428182232.852576017@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200428182231.704304409@linuxfoundation.org> References: <20200428182231.704304409@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tero Kristo [ Upstream commit 982bb70517aef2225bad1d802887b733db492cc0 ] Currently the watchdog core does not initialize the last_hw_keepalive time during watchdog startup. This will cause the watchdog to be pinged immediately if enough time has passed from the system boot-up time, and some types of watchdogs like K3 RTI does not like this. To avoid the issue, setup the last_hw_keepalive time during watchdog startup. Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200302200426.6492-3-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- drivers/watchdog/watchdog_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index ce04edc69e5f0..c4147e93aa7d4 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -282,6 +282,7 @@ static int watchdog_start(struct watchdog_device *wdd) if (err == 0) { set_bit(WDOG_ACTIVE, &wdd->status); wd_data->last_keepalive = started_at; + wd_data->last_hw_keepalive = started_at; watchdog_update_worker(wdd); } -- 2.20.1