Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2011 14:35:18 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222822 - stable/8/sys/powerpc/powermac
Message-ID:  <201106071435.p57EZINH087733@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106071435.p57EZINH087733>