Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp616935pxb; Wed, 3 Mar 2021 10:51:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJytsRkLQiqAdcD6TKRWWx8OpfiEQR16+eOcm1lNMDbfo+j4SsDjOe9oPXoWSldal6ZS5kqt X-Received: by 2002:a50:bc15:: with SMTP id j21mr683967edh.187.1614797492287; Wed, 03 Mar 2021 10:51:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614797492; cv=none; d=google.com; s=arc-20160816; b=dfm9jX2k6kFxhh3Qy4rfDkBQg8mVhanSiVHSOfXoUyhP4kmB55ybCCwnx9R7uxJB78 YDnEvSNeJrkKQXqvwbTrdBa7VfE6EDEfiNKb2uQ7zSQJ+5+QACd/JXroZXeu/dsu0mzV y6/Q+FkOIErZ4oS+RDBkYiwObTOleYwOWgQ7YOoE/2qF+CRp35av1UWG00wEagZiFOuG 6A7y/fRJu7y3AcVrpzf6vQELZIBidZ/GfCB9FVB+BQsBWgSd7fZTbc2jN4orIXVh34ry pDsnxb9iiFrtEBl3TrYkJDBbAbF3QaNGGWn9lCDlHk7pCAZKcnDP3EhnXX0a6tMWJNJp cE/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YoldsvkNyFZZj2v+0BYPIk7XiK4I2KhmIEmmv9ri1eE=; b=Qse2ejbvVL6RBJATEFD2cDi1vq6dnWiTm7YkRVxJ6DoqhrV5Q3AYF3IQtOB942Pp5D MouyDXDIr4NLWvzEHAfBOYnxDUJVtmko89aeeXDJEv/R+aM8naaI4D547RgB8UoOVHn0 VCO13yv0eCoRbKfazl3HOzPNLYpeQEcSybpfS7WnXw2Zi5LoZjl+3vYiCaVvLIJB6DNS Imzsq27yJhdUF2y+p4OBKPQNZWrO5rn4xQEk5Bt28jEoRDGRy7u79OZ7SsuHr302CuD0 Q5bcxRgbCds3Cq0gjhn8Zl/XvtSbvtv4fXMPemsHwNJ9xlCZV1kj3zHN+WaZ2DF6vZsh pP0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W5Tpf2qb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si15609076edy.263.2021.03.03.10.50.40; Wed, 03 Mar 2021 10:51:32 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W5Tpf2qb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378493AbhCBBGY (ORCPT + 99 others); Mon, 1 Mar 2021 20:06:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:34108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240857AbhCATBU (ORCPT ); Mon, 1 Mar 2021 14:01:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BCB4365106; Mon, 1 Mar 2021 17:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618150; bh=Pv9NNrYFiFCPxUMNwvBOzdGcfEdBNLjqcJM0rtlmYlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W5Tpf2qbmCk/xfDa3dcSZIDsXf9Kj48OPcTCKMiQoZ4/tIp5xe7P3Sa+AAqUdov4k ZJ93C2Laiuvk5kNkKmpucRgvb5LzPD2V4BIByZdbrIqHrpg0Jq/f73TqV/hCNT2MrO k5qYIK9x54ih3rhCibMANp+5glELRivTYne7fEnk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Usyskin , Tomas Winkler , Guenter Roeck , Wim Van Sebroeck Subject: [PATCH 5.4 294/340] watchdog: mei_wdt: request stop on unregister Date: Mon, 1 Mar 2021 17:13:58 +0100 Message-Id: <20210301161102.768536559@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161048.294656001@linuxfoundation.org> References: <20210301161048.294656001@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Usyskin commit 740c0a57b8f1e36301218bf549f3c9cc833a60be upstream. The MEI bus has a special behavior on suspend it destroys all the attached devices, this is due to the fact that also firmware context is not persistent across power flows. If watchdog on MEI bus is ticking before suspending the firmware times out and reports that the OS is missing watchdog tick. Send the stop command to the firmware on watchdog unregistered to eliminate the false event on suspend. This does not make the things worse from the user-space perspective as a user-space should re-open watchdog device after suspending before this patch. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210124114938.373885-1-tomas.winkler@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/mei_wdt.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/watchdog/mei_wdt.c +++ b/drivers/watchdog/mei_wdt.c @@ -382,6 +382,7 @@ static int mei_wdt_register(struct mei_w watchdog_set_drvdata(&wdt->wdd, wdt); watchdog_stop_on_reboot(&wdt->wdd); + watchdog_stop_on_unregister(&wdt->wdd); ret = watchdog_register_device(&wdt->wdd); if (ret)