Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c A fan reading of 0xff is also invalid (observed ...
details: https://anonhg.NetBSD.org/src/rev/a35cb9c05638
branches: trunk
changeset: 790913:a35cb9c05638
user: jdc <jdc%NetBSD.org@localhost>
date: Sat Oct 26 18:28:15 2013 +0000
description:
A fan reading of 0xff is also invalid (observed on AlphaServer DS20L).
diffstat:
sys/dev/i2c/lm87.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 6fb459e9b5ed -r a35cb9c05638 sys/dev/i2c/lm87.c
--- a/sys/dev/i2c/lm87.c Sat Oct 26 18:07:52 2013 +0000
+++ b/sys/dev/i2c/lm87.c Sat Oct 26 18:28:15 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lm87.c,v 1.2 2013/10/18 15:16:08 jdc Exp $ */
+/* $NetBSD: lm87.c,v 1.3 2013/10/26 18:28:15 jdc Exp $ */
/* $OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.2 2013/10/18 15:16:08 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.3 2013/10/26 18:28:15 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -365,7 +365,7 @@
break;
}
tmp = data * sc->sc_fan1_div;
- if (tmp == 0)
+ if (tmp == 0 || tmp == 0xff)
edata->state = ENVSYS_SINVALID;
else
edata->value_cur = 1350000 / tmp;
@@ -378,7 +378,7 @@
break;
}
tmp = data * sc->sc_fan2_div;
- if (tmp == 0)
+ if (tmp == 0 || tmp == 0xff)
edata->state = ENVSYS_SINVALID;
else
edata->value_cur = 1350000 / tmp;
Home |
Main Index |
Thread Index |
Old Index