summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac/smu.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-05-28 21:54:18 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-05-28 21:54:18 +0000
commit6182e8b704c704bf06d61942bcea7a82d283cc1d (patch)
treeaab822ec66125ee05cfbf9b0679d89124552adf2 /sys/powerpc/powermac/smu.c
parent6caf59586e0d74193c6c5726a474743b20b4423e (diff)
downloadFreeBSD-src-6182e8b704c704bf06d61942bcea7a82d283cc1d.zip
FreeBSD-src-6182e8b704c704bf06d61942bcea7a82d283cc1d.tar.gz
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
Diffstat (limited to 'sys/powerpc/powermac/smu.c')
-rw-r--r--sys/powerpc/powermac/smu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/powermac/smu.c b/sys/powerpc/powermac/smu.c
index 9041b30..09025b1 100644
--- a/sys/powerpc/powermac/smu.c
+++ b/sys/powerpc/powermac/smu.c
@@ -662,7 +662,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int rpm)
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];
OpenPOWER on IntegriCloud