Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2087226pxb; Sat, 2 Oct 2021 06:25:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxefEf5p8h0PgVVbPgKOoe9iyBj33PhLFciREDxYwLo/ph4jK1R001GPUOc6JGdok/3kKuK X-Received: by 2002:a63:3748:: with SMTP id g8mr2891037pgn.102.1633181123122; Sat, 02 Oct 2021 06:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633181123; cv=none; d=google.com; s=arc-20160816; b=xJpLYN7er0X1Xr+4Vl0pQzoWv0VqyTKqB3hXIxN7onhh5nVwc5jRBOGLqNOFO8tIWz 6vi9yGQ3v8qlyAdbaULXXl6M/Quf4vrhCgOqi4VAbie54vhJ/KEJxrWAFfRopD+nepKk pjUt8YX97hQ7koDTUvZJR4QFMoUKdQn/DsyJLU4CDwMQmlh0gIVUQhEf7dPh5ZuCHTLx hjsKG3AgjUUhiMib0mLbuIrYugDWrT4OT87gfc96Dx+6UD7dbJJi00Gz5Nf0YRzqoC8C VrD7M+luCPGdqIJ7PwGYcRbTDR8SCy1b/dCrvWmGhHJQst8D9+5AITIjT/ecNht4Hy84 MMKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=QBSl8KLZfvvqBorGkoZwonl+sNhMvfAEnMRg2p1fh00=; b=VKM0iIx/bABiEDVpX5Og5seYQLoZVIBl8/56etGqf76LO1saLfXQNHXkI+BTzbkU7W ftE3gwxbvhP4r65/TIW8+BJ1VAtZf+b0sQemahYhY2WN2D/nUxds12jtcxWOj46IsUDJ gG6z2XZO3wj9JjRXJRfOE2udaUm9i0o3iKKUtoTzpzsjTho7AwM7IUbLFnXj19ehUCzR 0wDKzKsss/02VQArGs9ldXfNgTT1a6DzOCgG59bqVIr83B1oAeIiY40APcbipz5zwHFx tMJeBvqP3MPb6laWibH6qFN4PgTZNzV4EfB63eBjDxyDz2ZUB5T9gNUbLmMn5ueFDbNn 1Zmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VgoiZLtF; 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 m9si11986697pgv.403.2021.10.02.06.25.10; Sat, 02 Oct 2021 06:25:23 -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=@gmail.com header.s=20210112 header.b=VgoiZLtF; 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 S233093AbhJBNYw (ORCPT + 99 others); Sat, 2 Oct 2021 09:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbhJBNYv (ORCPT ); Sat, 2 Oct 2021 09:24:51 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B61C9C0613EC; Sat, 2 Oct 2021 06:23:05 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id h9-20020a9d2f09000000b005453f95356cso15183234otb.11; Sat, 02 Oct 2021 06:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=QBSl8KLZfvvqBorGkoZwonl+sNhMvfAEnMRg2p1fh00=; b=VgoiZLtFojg4+m6RAGiiJpQseva6KA7EgzFdEPWjbvjmVs0KV2rZz3PyGzMaCBmDwz Yx5g8KHsqWe6GUsMDbFavI659xyroK0+9F9Q0kVblI6iZzsq0BUwEvy4CeQaGC13BQUi VkM2CNQaEnpGILbNIcWBftR5UPpTDzquAkJPivB91uuTp9LkUpZ+HLyQCURMiiC0AjeW XvN6fpXGPEW/0tTz7oSRmw2x4NxuczSH0hVCWuJ6x1VTTKQ1jakXN5c7W4Ji9N4uRmhN Z+W7Ak1EKFIr5Y0AkBjilpGX2rlNjdUnGmqeg15Tp9J63cT8y5vpDBCvNb4JCYTO6dUk xp+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=QBSl8KLZfvvqBorGkoZwonl+sNhMvfAEnMRg2p1fh00=; b=ZUMWKvvaznkVUCIRlqXZupU3SciJ/7tBnmlRdb5u0tTLyb6nRdUTtWdjq37EXWaWv6 /JV77mhnzYy6gt/k73X3jMW++KvuGJV6OwwiqFsGPlUHCGwP5Bkio4uJl3/GtbtnKUj0 WwrbD4bzVEM5tP1EhRXdnXdUbN5Pcj1/YCIrBc7QipxznMS/w8eZyJNgsr3LqRakGRlb /rX/AtFSQCl1yVpYOfkYJcKDjpcJxibkD4xuVXwcrswqP3bOTGS/M+hUCUtzocyJ8O7U 5U7tvurVQymen9lkGHwCaxKDZhoQJnD2pySQlG7OJyaE18lk/kYSOkfIAflmfojujebk z0fg== X-Gm-Message-State: AOAM530no64GjaxXV5SIkvsSaxYUaM2e4GGiMtxXK/gWhOCGvFvq7SRX cSdEeoA7HAt8CamiToLUnQ4= X-Received: by 2002:a9d:2f24:: with SMTP id h33mr2709896otb.254.1633180985182; Sat, 02 Oct 2021 06:23:05 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id f61sm1735254otf.73.2021.10.02.06.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:23:04 -0700 (PDT) Sender: Guenter Roeck Date: Sat, 2 Oct 2021 06:23:03 -0700 From: Guenter Roeck To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: "Rafael J . Wysocki" , Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] watchdog: iTCO_wdt: Full reinitialize on resume Message-ID: <20211002132303.GB4023280@roeck-us.net> References: <20210928165343.23401-1-linux@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210928165343.23401-1-linux@weissschuh.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 06:53:43PM +0200, Thomas Wei?schuh wrote: > The Thinkpad T460s always needs driver-side suspend-resume handling. > If the watchdog is not stopped before suspend then the system will hang > on resume. > If the interval is not set before starting the watchdog then the machine > will instantly be reset after resume. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=198019 The Fixes: tag references a SHA, not a bugzilla bug. > > Signed-off-by: Thomas Wei?schuh > --- > drivers/watchdog/iTCO_wdt.c | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c > index 643c6c2d0b72..2297a0a1e5fc 100644 > --- a/drivers/watchdog/iTCO_wdt.c > +++ b/drivers/watchdog/iTCO_wdt.c > @@ -47,6 +47,7 @@ > /* Includes */ > #include /* For ACPI support */ > #include /* For BIT() */ > +#include /* For DMI matching */ > #include /* For module specific items */ > #include /* For new moduleparam's */ > #include /* For standard types (like size_t) */ > @@ -605,9 +606,20 @@ static int iTCO_wdt_probe(struct platform_device *pdev) > */ > > #ifdef CONFIG_ACPI > +static const struct dmi_system_id iTCO_wdt_force_suspend[] = { > + { > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > + DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad T460s"), > + }, > + }, > + { }, > +}; > + > static inline bool need_suspend(void) > { > - return acpi_target_system_state() == ACPI_STATE_S0; > + return acpi_target_system_state() == ACPI_STATE_S0 || > + dmi_check_system(iTCO_wdt_force_suspend); > } > #else > static inline bool need_suspend(void) { return true; } > @@ -631,8 +643,10 @@ static int iTCO_wdt_resume_noirq(struct device *dev) > { > struct iTCO_wdt_private *p = dev_get_drvdata(dev); > > - if (p->suspended) > + if (p->suspended) { > + iTCO_wdt_set_timeout(&p->wddev, p->wddev.timeout); > iTCO_wdt_start(&p->wddev); > + } > > return 0; > } > > base-commit: 41e73feb1024929e75eaf2f7cd93f35a3feb331b > -- > 2.33.0 >