From owner-freebsd-stable@FreeBSD.ORG Tue Aug 7 09:37:31 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4999B106566B; Tue, 7 Aug 2012 09:37:31 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id A08498FC0C; Tue, 7 Aug 2012 09:37:30 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.5/8.14.5) with ESMTP id q779bQqa018657; Tue, 7 Aug 2012 16:37:26 +0700 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <5020E1D6.4030801@rdtc.ru> Date: Tue, 07 Aug 2012 16:37:26 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <1342742294.2656.24.camel@powernoodle.corp.yahoo.com> <201208021634.20529.jhb@freebsd.org> <1343948488.2838.0.camel@powernoodle.corp.yahoo.com> <201208061038.20056.jhb@freebsd.org> In-Reply-To: <201208061038.20056.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "attilio@freebsd.org" , "freebsd-stable@freebsd.org" , Sean Bruno Subject: Re: [stable 9] panic on reboot: ipmi_wd_event() X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2012 09:37:31 -0000 > Ok, can you try this instead of the other patch. It makes the IPMI driver not > bother clearing the watchdog if it isn't running. I suffered from exactly same problem (same kdb backtrace) and this patch fixed it, thanks! > Index: dev/ipmi/ipmi.c > =================================================================== > --- dev/ipmi/ipmi.c (revision 238992) > +++ dev/ipmi/ipmi.c (working copy) > @@ -653,11 +653,12 @@ > if (timeout == 0) > timeout = 1; > e = ipmi_set_watchdog(sc, timeout); > - if (e == 0) > + if (e == 0) { > *error = 0; > - else > + sc->ipmi_watchdog_active = 1; > + } else > (void)ipmi_set_watchdog(sc, 0); > - } else { > + } else if (atomic_readandclear_int(&sc->ipmi_watchdog_active) != 0) { > e = ipmi_set_watchdog(sc, 0); > if (e != 0 && cmd == 0) > *error = EOPNOTSUPP; > Index: dev/ipmi/ipmivars.h > =================================================================== > --- dev/ipmi/ipmivars.h (revision 238992) > +++ dev/ipmi/ipmivars.h (working copy) > @@ -105,6 +105,7 @@ > struct cdev *ipmi_cdev; > TAILQ_HEAD(,ipmi_request) ipmi_pending_requests; > eventhandler_tag ipmi_watchdog_tag; > + int ipmi_watchdog_active; > struct intr_config_hook ipmi_ich; > struct mtx ipmi_lock; > struct cv ipmi_request_added; >