Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Initializes sensors states before registering.



details:   https://anonhg.NetBSD.org/src/rev/60f2ee9f7117
branches:  trunk
changeset: 766320:60f2ee9f7117
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jun 20 17:48:45 2011 +0000

description:
Initializes sensors states before registering.

diffstat:

 sys/dev/ic/cac.c    |  5 +++--
 sys/dev/ic/ciss.c   |  8 +++++---
 sys/dev/ic/mfi.c    |  5 +++--
 sys/dev/ic/nslm7x.c |  5 +++--
 4 files changed, 14 insertions(+), 9 deletions(-)

diffs (114 lines):

diff -r d76ee000147e -r 60f2ee9f7117 sys/dev/ic/cac.c
--- a/sys/dev/ic/cac.c  Mon Jun 20 17:44:33 2011 +0000
+++ b/sys/dev/ic/cac.c  Mon Jun 20 17:48:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cac.c,v 1.51 2010/11/13 13:52:00 uebayasi Exp $        */
+/*     $NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $        */
 
 /*-
  * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.51 2010/11/13 13:52:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -683,6 +683,7 @@
 
        for (i = 0; i < nsensors; i++) {
                sc->sc_sensor[i].units = ENVSYS_DRIVE;
+               sc->sc_sensor[i].state = ENVSYS_SINVALID;
                /* Enable monitoring for drive state changes */
                sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
                /* logical drives */
diff -r d76ee000147e -r 60f2ee9f7117 sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Mon Jun 20 17:44:33 2011 +0000
+++ b/sys/dev/ic/ciss.c Mon Jun 20 17:48:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $ */
+/*     $NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $       */
 /*     $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $        */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -1421,6 +1421,7 @@
 
        for (i = 0; i < nsensors; i++) {
                sc->sc_sensor[i].units = ENVSYS_DRIVE;
+               sc->sc_sensor[i].state = ENVSYS_SINVALID;
                /* Enable monitoring for drive state changes */
                sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
                /* logical drives */
@@ -1436,7 +1437,8 @@
        sc->sc_sme->sme_cookie = sc;
        sc->sc_sme->sme_refresh = ciss_sensor_refresh;
        if (sysmon_envsys_register(sc->sc_sme)) {
-               printf("%s: unable to register with sysmon\n", device_xname(&sc->sc_dev));
+               printf("%s: unable to register with sysmon\n",
+                   device_xname(&sc->sc_dev));
                return(1);
        }
        return (0);
diff -r d76ee000147e -r 60f2ee9f7117 sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c  Mon Jun 20 17:44:33 2011 +0000
+++ b/sys/dev/ic/mfi.c  Mon Jun 20 17:48:45 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.34 2010/03/14 18:06:28 pgoyette Exp $ */
+/* $NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom <marco%peereboom.us@localhost>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.34 2010/03/14 18:06:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -2021,6 +2021,7 @@
 
        for (i = 0; i < nsensors; i++) {
                sc->sc_sensor[i].units = ENVSYS_DRIVE;
+               sc->sc_sensor[i].state = ENVSYS_SINVALID;
                /* Enable monitoring for drive state changes */
                sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
                /* logical drives */
diff -r d76ee000147e -r 60f2ee9f7117 sys/dev/ic/nslm7x.c
--- a/sys/dev/ic/nslm7x.c       Mon Jun 20 17:44:33 2011 +0000
+++ b/sys/dev/ic/nslm7x.c       Mon Jun 20 17:48:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $ */
+/*     $NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1667,6 +1667,7 @@
        lmsc->sc_sme = sysmon_envsys_create();
        /* Initialize sensors */
        for (i = 0; i < lmsc->numsensors; i++) {
+               lmsc->sensors[i].state = ENVSYS_SINVALID;
                if (sysmon_envsys_sensor_attach(lmsc->sc_sme,
                                                &lmsc->sensors[i])) {
                        sysmon_envsys_destroy(lmsc->sc_sme);



Home | Main Index | Thread Index | Old Index