OSDN Git Service

mpt2sas, mpt3sas: log exceeded temperature thresholds
authorSreekanth Reddy <sreekanth.reddy@avagotech.com>
Mon, 12 Jan 2015 06:08:56 +0000 (11:38 +0530)
committerChristoph Hellwig <hch@lst.de>
Tue, 13 Jan 2015 15:27:23 +0000 (16:27 +0100)
commit2d8ce8c9d4b25b88eb4aa6bc52492eb7e0ae1dab
treec452e3daa9cd66844d5141a4025b769b16392c80
parentcb16ef384f15d33a53b4db47878aa818be059d77
mpt2sas, mpt3sas: log exceeded temperature thresholds

This patch will log a message when driver receives "Temperature Threshold
exceeded" event from any temperature sensor.

The message will look similar to like:
mpt3sas0: Temperature Threshold flags a b c d exceeded for Sensor: x !!!
mpt3sas0: Current Temp In Celsius: y

where a b c d are threshold flags 0 1 2 3

Change_set:
1. Get the number of sensor count of this IOC by reading IO Unit page 8 at
   driver initialization time.
2. Also unmask the Temperature Threshold Event at driver initialization
   time
3. Whenever a MPI2_EVENT_TEMP_THRESHOLD event is received from the
   firmware, then print the sensor number, the maximum threshold number it
   has exceed and the current temperature of this sensor.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_base.h
drivers/scsi/mpt2sas/mpt2sas_config.c
drivers/scsi/mpt2sas/mpt2sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_config.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c