diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-10-27 13:37:05 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:31 -0500 |
commit | 57127f157298ea2dacbbc878a3c5d2a5daca772c (patch) | |
tree | 2536d995c36e068576a690b33cd2029f0749ddbe /drivers/scsi/lpfc/lpfc_attr.c | |
parent | d1a357fcc8348d325d151f6fe0ea54e317652457 (diff) |
[SCSI] lpfc 8.2.3 : Added support for ASICs that report temperature
Added support for ASICs that report temperature. Temperature notices are
reported as events and logged. Temperature can be read via sysfs.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 80a11218b9bb..bd35e9c7b995 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -86,6 +86,15 @@ lpfc_serialnum_show(struct class_device *cdev, char *buf) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | static ssize_t | 88 | static ssize_t |
89 | lpfc_temp_sensor_show(struct class_device *cdev, char *buf) | ||
90 | { | ||
91 | struct Scsi_Host *shost = class_to_shost(cdev); | ||
92 | struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; | ||
93 | struct lpfc_hba *phba = vport->phba; | ||
94 | return snprintf(buf, PAGE_SIZE, "%d\n",phba->temp_sensor_support); | ||
95 | } | ||
96 | |||
97 | static ssize_t | ||
89 | lpfc_modeldesc_show(struct class_device *cdev, char *buf) | 98 | lpfc_modeldesc_show(struct class_device *cdev, char *buf) |
90 | { | 99 | { |
91 | struct Scsi_Host *shost = class_to_shost(cdev); | 100 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -908,6 +917,8 @@ static CLASS_DEVICE_ATTR(used_rpi, S_IRUGO, lpfc_used_rpi_show, NULL); | |||
908 | static CLASS_DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL); | 917 | static CLASS_DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL); |
909 | static CLASS_DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL); | 918 | static CLASS_DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL); |
910 | static CLASS_DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); | 919 | static CLASS_DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); |
920 | static CLASS_DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, | ||
921 | NULL); | ||
911 | 922 | ||
912 | 923 | ||
913 | static char *lpfc_soft_wwn_key = "C99G71SL8032A"; | 924 | static char *lpfc_soft_wwn_key = "C99G71SL8032A"; |
@@ -1494,6 +1505,7 @@ struct class_device_attribute *lpfc_hba_attrs[] = { | |||
1494 | &class_device_attr_state, | 1505 | &class_device_attr_state, |
1495 | &class_device_attr_num_discovered_ports, | 1506 | &class_device_attr_num_discovered_ports, |
1496 | &class_device_attr_lpfc_drvr_version, | 1507 | &class_device_attr_lpfc_drvr_version, |
1508 | &class_device_attr_lpfc_temp_sensor, | ||
1497 | &class_device_attr_lpfc_log_verbose, | 1509 | &class_device_attr_lpfc_log_verbose, |
1498 | &class_device_attr_lpfc_lun_queue_depth, | 1510 | &class_device_attr_lpfc_lun_queue_depth, |
1499 | &class_device_attr_lpfc_hba_queue_depth, | 1511 | &class_device_attr_lpfc_hba_queue_depth, |