From owner-svn-src-stable-8@FreeBSD.ORG Tue Jun 7 14:35:18 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6A411065670; Tue, 7 Jun 2011 14:35:18 +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 A60A78FC08; Tue, 7 Jun 2011 14:35:18 +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 p57EZIdj087735; Tue, 7 Jun 2011 14:35:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p57EZINH087733; Tue, 7 Jun 2011 14:35:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201106071435.p57EZINH087733@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 7 Jun 2011 14:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222822 - stable/8/sys/powerpc/powermac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2011 14:35:18 -0000 Author: nwhitehorn Date: Tue Jun 7 14:35:18 2011 New Revision: 222822 URL: http://svn.freebsd.org/changeset/base/222822 Log: MFC r222430: 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. Modified: stable/8/sys/powerpc/powermac/smu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/powerpc/powermac/smu.c ============================================================================== --- stable/8/sys/powerpc/powermac/smu.c Tue Jun 7 14:00:47 2011 (r222821) +++ stable/8/sys/powerpc/powermac/smu.c Tue Jun 7 14:35:18 2011 (r222822) @@ -684,7 +684,7 @@ smu_fan_set_rpm(device_t smu, struct smu cmd.data[3] = rpm & 0xff; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; } @@ -716,7 +716,7 @@ smu_fan_read_rpm(device_t smu, struct sm 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];