diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-10-18 19:21:53 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-10-18 19:21:53 +0000 |
commit | 322e4dbc57d62bf672dad5f4c12382f9c69a7e71 (patch) | |
tree | 4f44807b67456a277ac252bc21a7430789e8dd5c /sys | |
parent | 1f4337222928af5a5c6e3f9a2e99f32ca64d8d7c (diff) |
ignore fans with >= 0x0fff readings. According to the iic_dump(), it appears
as if all the invalid fans have either 0x0f00 or 0x0000 readings, but with the
in-the-field driver 0x0f00 appears as 0x0fff. At any rate, no real fans would
have sensors detecting 0x0f00 (351 RPM), so no harm continuing to ignore it, t.
tested by jon.steel@esentire.com
discussed with kettenis@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/i2c/w83793g.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2c/w83793g.c b/sys/dev/i2c/w83793g.c index 288b1d3b089..f6f8179b99a 100644 --- a/sys/dev/i2c/w83793g.c +++ b/sys/dev/i2c/w83793g.c @@ -1,4 +1,4 @@ -/* $OpenBSD: w83793g.c,v 1.3 2007/10/17 16:38:51 cnst Exp $ */ +/* $OpenBSD: w83793g.c,v 1.4 2007/10/18 19:21:52 cnst Exp $ */ /* * Copyright (c) 2007 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru> @@ -266,7 +266,7 @@ wbng_refresh_fans(struct wbng_softc *sc) uint8_t l = wbng_readreg(sc, WB_FAN_START + i * 2 + 1); uint16_t b = h << 8 | l; - if (b == 0x0f00 || b == 0x0000) { + if (b >= 0x0fff || b == 0x0f00 || b == 0x0000) { s[i].flags |= SENSOR_FINVALID; s[i].value = 0; } else { |