Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Initialize sensors states before registering.



details:   https://anonhg.NetBSD.org/src/rev/513a957d9bba
branches:  trunk
changeset: 766317:513a957d9bba
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jun 20 17:29:06 2011 +0000

description:
Initialize sensors states before registering.

diffstat:

 sys/dev/pci/arcmsr.c |  7 +++++--
 sys/dev/pci/viaenv.c |  7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (63 lines):

diff -r 34b77cc2884e -r 513a957d9bba sys/dev/pci/arcmsr.c
--- a/sys/dev/pci/arcmsr.c      Mon Jun 20 17:24:16 2011 +0000
+++ b/sys/dev/pci/arcmsr.c      Mon Jun 20 17:29:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $ */
+/*     $NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $ */
 /*     $OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -1746,6 +1746,7 @@
                        goto bad;
 
                sc->sc_arc_sensors[count].arc_sensor.units = ENVSYS_DRIVE;
+               sc->sc_arc_sensors[count].arc_sensor.state = ENVSYS_SINVALID;
                sc->sc_arc_sensors[count].arc_sensor.flags =
                    ENVSYS_FMONSTCHANGED;
 
@@ -1773,6 +1774,8 @@
 
                /* Attach disk sensors for this volume */
                for (j = 0; j < bv.bv_nodisk; j++) {
+                       sc->sc_arc_sensors[count].arc_sensor.state =
+                           ENVSYS_SINVALID;
                        sc->sc_arc_sensors[count].arc_sensor.units =
                            ENVSYS_DRIVE;
                        sc->sc_arc_sensors[count].arc_sensor.flags =
diff -r 34b77cc2884e -r 513a957d9bba sys/dev/pci/viaenv.c
--- a/sys/dev/pci/viaenv.c      Mon Jun 20 17:24:16 2011 +0000
+++ b/sys/dev/pci/viaenv.c      Mon Jun 20 17:29:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viaenv.c,v 1.30 2010/12/10 21:20:09 phx Exp $  */
+/*     $NetBSD: viaenv.c,v 1.31 2011/06/20 17:29:06 pgoyette Exp $     */
 
 /*
  * Copyright (c) 2000 Johan Danielsson
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.30 2010/12/10 21:20:09 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.31 2011/06/20 17:29:06 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -343,6 +343,9 @@
 
 #undef COPYDESCR
 
+       for (i = 0; i < 10; i++)
+               sc->sc_sensor[i].state = ENVSYS_SINVALID;
+
        sc->sc_sme = sysmon_envsys_create();
 
        /* Initialize sensors */



Home | Main Index | Thread Index | Old Index