From owner-freebsd-stable@FreeBSD.ORG Wed Aug 29 09:36:51 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78302106566B for ; Wed, 29 Aug 2012 09:36:51 +0000 (UTC) (envelope-from citrin@citrin.ru) Received: from mail-chaos.rambler.ru (mail-chaos.rambler.ru [81.19.68.130]) by mx1.freebsd.org (Postfix) with ESMTP id 2EFB98FC14 for ; Wed, 29 Aug 2012 09:36:50 +0000 (UTC) Received: from citrin.office.vega.ru (office-nat.spylog.net [193.169.234.6]) (Authenticated sender: citrin@citrin.ru) by mail-chaos.rambler.ru (Postfix) with ESMTPSA id 4CC7617038 for ; Wed, 29 Aug 2012 13:36:44 +0400 (MSD) Message-ID: <503DE2AB.6030702@citrin.ru> Date: Wed, 29 Aug 2012 13:36:43 +0400 From: Anton Yuzhaninov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0.2) Gecko/20110922 Thunderbird/6.0.2 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Problem with IPMI KCS driver 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: Wed, 29 Aug 2012 09:36:51 -0000 We use servers witch motherboard Supermicro X8DTT-H and meet with such problem: when watchdogd started, server is rebooted by IPMI watchdog several times per week. After some debugging I've found, that sometimes IPMI driver entered endless loop, and watchdogd have no chances to reset watchdog timer. In such situation top show: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND ... 113 root -16 - 0K 16K CPU4 4 17:18 99.17% ipmi0: kcs Endless loop located in file /sys/dev/ipmi/ipmi_kcs.c and function kcs_wait_for_obf(): int status, start = ticks; status = INB(sc, KCS_CTL_STS); if (state == 0) { /* WAIT FOR OBF = 0 */ while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_OBF) { DELAY(100); status = INB(sc, KCS_CTL_STS); } } else { /* WAIT FOR OBF = 1 */ while (ticks - start < MAX_TIMEOUT && !(status & KCS_STATUS_OBF)) { DELAY(100); status = INB(sc, KCS_CTL_STS); } } It seems to be, that this loop intended to run no more than MAX_TIMEOUT ticks. but by some reason this timeout does not works and loop runs until reboot. Questions: 1. Is it correct to check ticks to implement timeout here? 2. how to fix this timeout? -- Anton Yuzhaninov