From nobody Sat Feb 17 19:22:37 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tcdwt13t3z53xd1; Sat, 17 Feb 2024 19:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tcdws4Cnmz4Ftn; Sat, 17 Feb 2024 19:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708197757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MM8scwRe86QvGy8h1qf7EoM+fAAWIJqGnaFUN4fFQB8=; b=EZywAPf3NkpOQEUJxPUc5hTk0F5/z1EzJ6p0Qp0hGTLQZH/xtzuePsPG/n6I7pN99NZBVD +KGW52NNxC7hr7UevJcC7GzAV6EVXy5c+TyXk4FoJQPNyDbTWl9gmFfXOLjfPBXJZdSk+l Y6yGGCG2EOIk/rTI987wiJA00I5X+se2/e5cflNT12YQsGBy5XEXWvuIvtcJcRxPU9+iLw D9p6hi3wm0JksnIETlmmOQtIjvrf45KtGAAEymQulNdEQJmtt3sqDFUG4WG1sVFOpkd4+z Csb2ADLhCRNR2pBjDVwPBzB0XUK9baiOaiTmqTZ4YC/C3S3HOi08lqLU29qGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708197757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MM8scwRe86QvGy8h1qf7EoM+fAAWIJqGnaFUN4fFQB8=; b=mgIz4dHHvN519V5QtHmt+FzpzOo7/+0NKTSisoYqEv0Ax/2FI+xzsBPytunU6R53UIg/8z H2Enz/t4Ae9FUANpCA834wp3XqiAQijdAkOuqkTmNEpoVNcTsgrkozivgVRPxgZheuwpr9 O1awkn6rVRmU9aT6RpREWA2K+hyBr5sm/NvC/DQz8iftYVXzjLvvnhP8aok8AMCetzFny7 KHQ7jV0gehjgS63hpbs+MHChFJtlfsOVeerC0tHn+LbfGiSKWMI+2y2SHR7H1gAxQHyQgv gU9GF7+sQMh6hbDOxAujH2yrjr03zDA8GYx0aCfk4WYyvTjRREalyefhfzV5eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708197757; a=rsa-sha256; cv=none; b=rdco/L939/bgUWUNidwVEiVSNMZb4KN86RBqV2/0kK06EaDqGIt0+cvFBA1E0wUc2qN2vG ZAER7Mv8jzRLXaFpJpkCkfq6uGZinN8xnHXx/ct6BkuY4dBK8akYCfDG8gROEYyMvQmTgS 1ipuI+tgLGTa3Cz2bI3SvYQawKkSvk26+y85XKTeWiMq1piCRMeJX41OeC0opg63JrvGt5 e/il6/mP5QwuEHddHaTO/iiAF7IvGI/9dtadfzFoDTHVxguQQsK6mZrmhmQPFAoxuQfbv8 OtlOstI9Y8/LvJIRYAgTp1McfJ9YOrCZFrJkCVQRGoc5fvNZEVukldQfvylZOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tcdws3K1JzLHx; Sat, 17 Feb 2024 19:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HJMbGQ000597; Sat, 17 Feb 2024 19:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HJMbXv000594; Sat, 17 Feb 2024 19:22:37 GMT (envelope-from git) Date: Sat, 17 Feb 2024 19:22:37 GMT Message-Id: <202402171922.41HJMbXv000594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 9ca7451d86dc - stable/13 - change ipmi watchdog to awlays stop when system is halted List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ca7451d86dcf8fb072491028e3b0fb50b2299c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=9ca7451d86dcf8fb072491028e3b0fb50b2299c5 commit 9ca7451d86dcf8fb072491028e3b0fb50b2299c5 Author: Andriy Gapon AuthorDate: 2023-01-03 17:26:45 +0000 Commit: Andriy Gapon CommitDate: 2024-02-17 19:22:08 +0000 change ipmi watchdog to awlays stop when system is halted That is, wd_shutdown_countdown value is ignored when halting. A halted system should remain halted for as long as needed until a power cycle, so the watchdog should not reset the system. (cherry picked from commit 8fdb26160160c4507eb2f644a982a3e05984cdf6) --- sys/dev/ipmi/ipmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 7fef4d5ad103..ff2a31859485 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -741,6 +741,10 @@ ipmi_shutdown_event(void *arg, int howto) * Zero value in wd_shutdown_countdown will disable watchdog; * Negative value in wd_shutdown_countdown will keep existing state; * + * System halt is a special case of shutdown where wd_shutdown_countdown + * is ignored and watchdog is disabled to ensure that the system remains + * halted as requested. + * * Revert to using a power cycle to ensure that the watchdog will * do something useful here. Having the watchdog send an NMI * instead is useless during shutdown, and might be ignored if an @@ -748,7 +752,7 @@ ipmi_shutdown_event(void *arg, int howto) */ wd_in_shutdown = true; - if (wd_shutdown_countdown == 0) { + if (wd_shutdown_countdown == 0 || (howto & RB_HALT) != 0) { /* disable watchdog */ ipmi_set_watchdog(sc, 0); sc->ipmi_watchdog_active = 0;