Module Name: src Committed By: pgoyette Date: Tue May 19 23:43:27 UTC 2009
Modified Files: src/sys/dev/i2c: sdtemp.c Log Message: When displaying boot-time trip-register settings, shift to exclude fractional bits. Otherwise, a setting of 52C reports 832 during boot, and that's way too hot for any memory! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/sdtemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/sdtemp.c diff -u src/sys/dev/i2c/sdtemp.c:1.1 src/sys/dev/i2c/sdtemp.c:1.2 --- src/sys/dev/i2c/sdtemp.c:1.1 Sat May 9 15:04:25 2009 +++ src/sys/dev/i2c/sdtemp.c Tue May 19 23:43:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sdtemp.c,v 1.1 2009/05/09 15:04:25 pgoyette Exp $ */ +/* $NetBSD: sdtemp.c,v 1.2 2009/05/19 23:43:27 pgoyette Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.1 2009/05/09 15:04:25 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.2 2009/05/19 23:43:27 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -282,17 +282,20 @@ iic_acquire_bus(sc->sc_tag, 0); if (sdtemp_read_16(sc, SDTEMP_REG_LOWER_LIM, &sc->sc_low_lim) == 0 && sc->sc_low_lim != 0) { - aprint_normal("low limit %d ", sc->sc_low_lim); + sc->sc_low_lim >>= 4; + aprint_normal("low limit %dC ", sc->sc_low_lim); i++; } if (sdtemp_read_16(sc, SDTEMP_REG_UPPER_LIM, &sc->sc_high_lim) == 0 && sc->sc_high_lim != 0) { - aprint_normal("high limit %d ", sc->sc_high_lim); + sc->sc_high_lim >>= 4; + aprint_normal("high limit %dC ", sc->sc_high_lim); i++; } if (sdtemp_read_16(sc, SDTEMP_REG_CRIT_LIM, &sc->sc_crit_lim) == 0 && sc->sc_crit_lim != 0) { - aprint_normal("critical limit %d ", sc->sc_crit_lim); + sc->sc_crit_lim >>= 4; + aprint_normal("critical limit %dC ", sc->sc_crit_lim); i++; } iic_release_bus(sc->sc_tag, 0);