From patchwork Thu Oct 20 15:03:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 9387021 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1DA31607D0 for ; Thu, 20 Oct 2016 15:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 087F929C7D for ; Thu, 20 Oct 2016 15:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF89129CB1; Thu, 20 Oct 2016 15:03:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC78029C7D for ; Thu, 20 Oct 2016 15:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757258AbcJTPDk (ORCPT ); Thu, 20 Oct 2016 11:03:40 -0400 Received: from mga03.intel.com ([134.134.136.65]:33169 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756936AbcJTPDk (ORCPT ); Thu, 20 Oct 2016 11:03:40 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 20 Oct 2016 08:03:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,371,1473145200"; d="scan'208";a="775078368" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 20 Oct 2016 08:03:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 48508D1; Thu, 20 Oct 2016 18:03:36 +0300 (EEST) From: Mika Westerberg To: linux-watchdog@vger.kernel.org Cc: Wim Van Sebroeck , Guenter Roeck , "Rafael J. Wysocki" , Mika Westerberg , linux-acpi@vger.kernel.org Subject: [PATCH] watchdog: wdat_wdt: Ping the watchdog on resume Date: Thu, 20 Oct 2016 18:03:36 +0300 Message-Id: <20161020150336.97791-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.9.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It turns out we need to ping the watchdog hardware on resume when we re-program it. Otherwise this results inadvertent reset to trigger right after the resume is completed. Signed-off-by: Mika Westerberg Acked-by: Guenter Roeck --- drivers/watchdog/wdat_wdt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index e473e3b23720..6d1fbda0f461 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -499,6 +499,10 @@ static int wdat_wdt_resume_noirq(struct device *dev) ret = wdat_wdt_enable_reboot(wdat); if (ret) return ret; + + ret = wdat_wdt_ping(&wdat->wdd); + if (ret) + return ret; } return wdat_wdt_start(&wdat->wdd);