From nobody Sat Feb 17 15:12:26 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 4TcXNC2ntpz5BFXZ; Sat, 17 Feb 2024 15:12:27 +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 4TcXNC1SBYz4Y5g; Sat, 17 Feb 2024 15:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708182747; 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=wx+803ighEo8jozgAdMtZSXxq1EwcKhyYL2tZEJ04kA=; b=db23hJwshjoj8bB0yzD/Fj8ROW4mq5YogTZKioRF3Ffgzu6wcvsxAAtP5yd/el3YVL/S0w Ej4ZU+O/t6V1f1aHgazMnWMo2XoYOlv+fdidWakgFHm1Lc11Iwp/Ng5DRK3RQDoyYeiFeH tdKZOKtrUeV846Py2Y60BwelougAFWZ/AU01Jw6Ry2/NtbejOsfOEvZMNk6vNLwqgpzmXk xPBGGfLO8mtD1040ehw+gkPfGpED6FPtmY4XU9h2gKqYWtGa8ISC2IedJOb3syPyGKppfh oof9L72GTFXU0TJqqJ/OeL1aJclqOW4PQ2AXsPkxUjNNFp8XDzJM2qUbXb81Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708182747; 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=wx+803ighEo8jozgAdMtZSXxq1EwcKhyYL2tZEJ04kA=; b=TgNTCx98RGrRgUvqjeb9aahOejPU5qiEcBMSxOEQoRhavVydEFGlKnkQaQ5M0IoePUGgw/ +qqdBPJ1eRyKR6w3Zt2r+EwweJeAPzaWjQTIt5Z9I39ITmhdfp8+9zr1e+OBoXPP04neoI rR0lUXVeZxW7JhfNNY9qmKiBB31YRKNKNDagREIH73+Shlb1IGqUGGcyB31nvK+SKxG1FG oO1Hz8aJPu31N3O/k09uHDsbAtoK7nz2hjMJRs+WB5bkDmfMm/u8hkTm98Qxrc9nm4N48d NHImbproYcu/WhJSJsv0abGhP0i2orpQ28089IbIGR+FBYjhNfkmWtQnuKmGLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708182747; a=rsa-sha256; cv=none; b=ZNJCoxjdEk/sT/wPC+G7NozmXvQB5scQ5J5t+poFwavIm9vxlInWGjemiZoWO2usKpQi06 DF7bcYcseqSpIMiYbYZAb9rggkKyc60u1rXf3I3eh4Tjzuj/VqxwGzaZ2IM80B6WBhPhEv AyIUF/PXWaqoEkjRSk7UDnVezH87d+JYa8JxSIcidO4/jID+Mceo/J6R6AIFOTSqqgIsGr O0ebEPKc1FxiGaHDVcfpALAhs2nOkTKSM3X/Y90hp0bWbJUVwiX0U4qVz04p9se90BrbMq 1bZVu6gd/7ydCDsRI5PuSLztEOaix9k/utRyxT5yviU9/IlnQ3hbLDU9YGAEoQ== 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 4TcXNC0YnTz1CG4; Sat, 17 Feb 2024 15:12:27 +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 41HFCQ49080711; Sat, 17 Feb 2024 15:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HFCQ5B080709; Sat, 17 Feb 2024 15:12:26 GMT (envelope-from git) Date: Sat, 17 Feb 2024 15:12:26 GMT Message-Id: <202402171512.41HFCQ5B080709@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: b5d826b1b6bc - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: b5d826b1b6bc863ae2d72b6ba18d0ece424e9824 Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=b5d826b1b6bc863ae2d72b6ba18d0ece424e9824 commit b5d826b1b6bc863ae2d72b6ba18d0ece424e9824 Author: Andriy Gapon AuthorDate: 2023-01-03 17:26:45 +0000 Commit: Andriy Gapon CommitDate: 2024-02-17 14:15:11 +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 3f66c3c199e3..d311f168baf5 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -767,6 +767,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 @@ -774,7 +778,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;