From owner-svn-src-head@freebsd.org Thu Oct 26 22:53:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D249E54C9F; Thu, 26 Oct 2017 22:53:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 892EF6CC4A; Thu, 26 Oct 2017 22:53:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9QMr2Fq009422; Thu, 26 Oct 2017 22:53:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9QMr2Vw009421; Thu, 26 Oct 2017 22:53:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201710262253.v9QMr2Vw009421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 26 Oct 2017 22:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325025 - head/sys/dev/ipmi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/ipmi X-SVN-Commit-Revision: 325025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 22:53:06 -0000 Author: imp Date: Thu Oct 26 22:53:02 2017 New Revision: 325025 URL: https://svnweb.freebsd.org/changeset/base/325025 Log: Make time we wait for a power cycle tunable. hw.ipmi.cycle_time is the time to wait for the power down phase of the ipmi power cycle before falling back to either reboot or halt. Sponsored by: Netflix Modified: head/sys/dev/ipmi/ipmi.c Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Thu Oct 26 22:52:51 2017 (r325024) +++ head/sys/dev/ipmi/ipmi.c Thu Oct 26 22:53:02 2017 (r325025) @@ -86,6 +86,7 @@ static int wd_timer_actions = IPMI_SET_WD_ACTION_POWER static int wd_shutdown_countdown = 420; /* sec */ static int wd_startup_countdown = 420; /* sec */ static int wd_pretimeout_countdown = 120; /* sec */ +static int cycle_wait = 10; /* sec */ static SYSCTL_NODE(_hw, OID_AUTO, ipmi, CTLFLAG_RD, 0, "IPMI driver parameters"); @@ -103,6 +104,9 @@ SYSCTL_INT(_hw_ipmi, OID_AUTO, wd_startup_countdown, C SYSCTL_INT(_hw_ipmi, OID_AUTO, wd_pretimeout_countdown, CTLFLAG_RW, &wd_pretimeout_countdown, 0, "IPMI watchdog pre-timeout countdown (seconds)"); +SYSCTL_INT(_hw_ipmi, OID_AUTO, cyle_wait, CTLFLAG_RWTUN, + &cycle_wait, 0, + "IPMI power cycle on reboot delay time (seconds)"); static struct cdevsw ipmi_cdevsw = { .d_version = D_VERSION, @@ -797,11 +801,11 @@ ipmi_power_cycle(void *arg, int howto) } /* - * BMCs are notoriously slow, give it up to 10s to effect the power + * BMCs are notoriously slow, give it cyle_wait seconds for the power * down leg of the power cycle. If that fails, fallback to the next * hanlder in the shutdown_final chain and/or the platform failsafe. */ - DELAY(10 * 1000 * 1000); + DELAY(cycle_wait * 1000 * 1000); device_printf(sc->ipmi_dev, "Power cycling via IPMI timed out\n"); }