svn commit: r222822 - stable/8/sys/powerpc/powermac
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Jun 7 14:35:18 UTC 2011
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];
More information about the svn-src-stable-8
mailing list