[SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware...
authorArmen Baloyan <armen.baloyan@qlogic.com>
Tue, 27 Aug 2013 05:37:47 +0000 (01:37 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 3 Sep 2013 14:28:06 +0000 (07:28 -0700)
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_mr.c
drivers/scsi/qla2xxx/qla_mr.h

index e48a71e7933f634dc5691a16c2d6a6ad03857bff..39d13061d742b36fa5c0417e65f977901e16f8ae 100644 (file)
@@ -1965,7 +1965,9 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type)
                    sizeof(vha->hw->mr.uboot_version));
                memcpy(&vha->hw->mr.fru_serial_num, pinfo->fru_serial_num,
                    sizeof(vha->hw->mr.fru_serial_num));
-               vha->hw->mr.critical_temperature = pinfo->nominal_temp_value;
+               vha->hw->mr.critical_temperature =
+                   (pinfo->nominal_temp_value) ?
+                   pinfo->nominal_temp_value : QLAFX00_CRITEMP_THRSHLD;
                ha->mr.extended_io_enabled = (pinfo->enabled_capabilities &
                    QLAFX00_EXTENDED_IO_EN_MASK) != 0;
        } else if (fx_type == FXDISC_GET_PORT_INFO) {
index 7b33416a2a63f18a6956fb6095ebbc375a569eed..79a93c52baec54b828f65cdeb7f602269a0a7724 100644 (file)
@@ -537,4 +537,7 @@ struct mr_data_fx00 {
 #define QLAFX00_RESET_INTERVAL         120     /* number of seconds */
 #define QLAFX00_MAX_RESET_INTERVAL     600     /* number of seconds */
 #define QLAFX00_CRITEMP_INTERVAL       60      /* number of seconds */
+
+#define QLAFX00_CRITEMP_THRSHLD                80      /* Celsius degrees */
+
 #endif