Print this page
8244 Some drives report a bogus reference temperature

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c
          +++ new/usr/src/lib/fm/libdiskstatus/common/ds_scsi.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2017 RackTop Systems.
  24   26   */
  25   27  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   28  #include <assert.h>
  29   29  #include <errno.h>
  30   30  #include <libdiskstatus.h>
  31   31  #include <limits.h>
  32   32  #include <stdlib.h>
  33   33  #include <strings.h>
  34   34  #include <sys/fm/io/scsi.h>
  35   35  
  36   36  #include "ds_scsi.h"
  37   37  #include "ds_scsi_sim.h"
↓ open down ↓ 1032 lines elided ↑ open up ↑
1070 1070                              temp->t_temp) != 0)
1071 1071                                  return (scsi_set_errno(sip, EDS_NOMEM));
1072 1072                          reftemp = temp->t_temp;
1073 1073                          break;
1074 1074                  }
1075 1075  
1076 1076                  plen = lphp->lph_length +
1077 1077                      sizeof (scsi_log_parameter_header_t);
1078 1078          }
1079 1079  
     1080 +        /*
     1081 +         * Take the reference temperature under advisory since it is often
     1082 +         * reported incorrectly.  If it's 40C or less we ignore it and only
     1083 +         * register a fault once the current temperature reaches above 60C.
     1084 +         */
1080 1085          if (reftemp != INVALID_TEMPERATURE && curtemp != INVALID_TEMPERATURE &&
1081      -            curtemp > reftemp)
     1086 +            curtemp > reftemp && (reftemp > 40 || curtemp > 60))
1082 1087                  sip->si_dsp->ds_faults |= DS_FAULT_OVERTEMP;
1083 1088  
1084 1089          return (0);
1085 1090  }
1086 1091  
1087 1092  static int
1088 1093  logpage_selftest_analyze(ds_scsi_info_t *sip, scsi_log_parameter_header_t *lphp,
1089 1094      int log_length)
1090 1095  {
1091 1096          int i, plen = 0;
↓ open down ↓ 261 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX