From owner-svn-src-head@FreeBSD.ORG Sat May 28 21:54:19 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A0C1106566B; Sat, 28 May 2011 21:54:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A08E8FC0C; Sat, 28 May 2011 21:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4SLsJZ1002021; Sat, 28 May 2011 21:54:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SLsJoR002019; Sat, 28 May 2011 21:54:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105282154.p4SLsJoR002019@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 May 2011 21:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222430 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 28 May 2011 21:54:19 -0000 Author: nwhitehorn Date: Sat May 28 21:54:18 2011 New Revision: 222430 URL: http://svn.freebsd.org/changeset/base/222430 Log: Require an error instead of a timeout to decide the new-style fan commands won't work. This prevents a busy system from making smu(4) suddenly decide its fans use the old-style command set. MFC after: 3 days Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Sat May 28 21:13:22 2011 (r222429) +++ head/sys/powerpc/powermac/smu.c Sat May 28 21:54:18 2011 (r222430) @@ -662,7 +662,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int cmd.data[3] = rpm & 0xff; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; } @@ -695,7 +695,7 @@ smu_fan_read_rpm(struct smu_fan *fan) cmd.data[1] = fan->reg; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; rpm = (cmd.data[0] << 8) | cmd.data[1];