From 0e3633f0ffab31dc8a1a9d47a9ef51a923895753 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Thu, 31 May 2007 18:34:13 +0000 Subject: if poking the controller fails for whatever reason the drives' sensor status will still be marked as ok (or etc..) thus erroneously reporting value as valid. this nice diff was from mickey --- sys/dev/ic/ami.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 4cb9650e03c..518707308b9 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.181 2007/05/29 22:17:50 todd Exp $ */ +/* $OpenBSD: ami.c,v 1.182 2007/05/31 18:34:12 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -2502,8 +2502,13 @@ ami_refresh_sensors(void *arg) int i; if (ami_mgmt(sc, AMI_FCOP, AMI_FC_RDCONF, 0, 0, sizeof(*sc->sc_bd), - sc->sc_bd)) + sc->sc_bd)) { + for (i = 0; i < sc->sc_nunits; i++) { + sc->sc_sensors[i].value = 0; /* unknown */ + sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; + } return; + } for (i = 0; i < sc->sc_nunits; i++) { switch (sc->sc_bd->ald[i].adl_status) { -- cgit v1.2.3