Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp337188ybh; Thu, 12 Mar 2020 03:00:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuhJqGgRLNHVEXmwg8UeCQ65kAa8/4ISJlrwRYdayNbgC/QG1ZveWOQmdeN4yTDPV941Ut2 X-Received: by 2002:a4a:9405:: with SMTP id h5mr3379978ooi.95.1584007209395; Thu, 12 Mar 2020 03:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584007209; cv=none; d=google.com; s=arc-20160816; b=0ADev4b7HCq4m3U+L2L4OrVsVjcnxAd4W20qGIdqDdjJy2wjnyz8WZXlTVIIrxvNq2 PE2GHhi3w3/czHrsAHhIrTF2/g2ENMyo7m18yVGJjam9Da2xz8RFc8rqgOmy0EJTqYDs 3wOd8CQ8XSv01vov78o/Yibh/QLRYJXgTDoEPA5BeN77ebuR/UzaU2ZRX2HAa/sO6HwB kf2rs3td7H19sx/JOP9xwRFAr6xGE5BUVArmKS0XAqjH6N/riTz+PGvswI66DxkO4e76 QYxs4qiaLSzIoEe2pryTVGl7v9VwEz91oh8Pgoe9xONEklDFYdll+pRWZdJ5IyRGNf40 fCMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eeRBacHWicGL36dL472v56vohTcHUBjKKJ0qiJ9iBkk=; b=IjQ56BBd5zRwTQz1swlQ/Qd1GAMaXDp3yj3g/H3T/PCCG+qS2ZJExUIaalA48FoLTA 2DbqDS+f46+embAhdc2ZuX/sP+xV8N/uaB4pX1jJ7SXprNTKpvt75+60padlswHN83gH kCofv+d+NZKo3vI+Phbvjrp7lINuQ7+EJxCpnFu+gqK4MAqqQ1Q4qDz7pdu7Qz//Lt2F JFh1P1n8kEA9EFfcYsjfi+OZ/XcsEP8Fz6LqJk7kP+lXyUWSm1/cVABPlcq4dt630nN2 tUnd6RT2Zj4vLcRQBejcrTBIk/k7QFQzHZzC/yxNVZYI5b6Q1FsOqlOIXsQGJZHcZi+0 o9lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vnbO0JCM; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si1785813otq.241.2020.03.12.02.59.57; Thu, 12 Mar 2020 03:00:09 -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=@ti.com header.s=ti-com-17Q1 header.b=vnbO0JCM; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbgCLJ6z (ORCPT + 99 others); Thu, 12 Mar 2020 05:58:55 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37996 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbgCLJ6z (ORCPT ); Thu, 12 Mar 2020 05:58:55 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02C9wUcW003936; Thu, 12 Mar 2020 04:58:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584007110; bh=eeRBacHWicGL36dL472v56vohTcHUBjKKJ0qiJ9iBkk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vnbO0JCMvvvC9qzJtYKlFwtiD91x4YeRQitM+g49lYaN7o+dL3lj7HHdY59H4KMEY slRbFD6BTaJa+wHH/HJFYGLwDqrrUTHufI37usGJ+7fq/xsiXWocWkL+/h1kN4vIcX y7JTmxzucYeHNnIQLKeALMk9E99sU9v4w5Xomn7M= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02C9wUoe009957 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Mar 2020 04:58:30 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 12 Mar 2020 04:58:29 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 12 Mar 2020 04:58:29 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02C9wOR7089783; Thu, 12 Mar 2020 04:58:28 -0500 From: Tero Kristo To: , , CC: Subject: [PATCHv4 2/4] watchdog: reset last_hw_keepalive time at start Date: Thu, 12 Mar 2020 11:58:06 +0200 Message-ID: <20200312095808.19907-3-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200312095808.19907-1-t-kristo@ti.com> References: <20200312095808.19907-1-t-kristo@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v4: * applied Guenter's reviewed by tag v2: * apply functionality always instead of being behind a flag 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 8b5c742f24e8..7e4cd34a8c20 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.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki