aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-10-27 13:37:05 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:31 -0500
commit57127f157298ea2dacbbc878a3c5d2a5daca772c (patch)
tree2536d995c36e068576a690b33cd2029f0749ddbe /drivers/scsi/lpfc/lpfc_attr.c
parentd1a357fcc8348d325d151f6fe0ea54e317652457 (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.c12
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
88static ssize_t 88static ssize_t
89lpfc_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
97static ssize_t
89lpfc_modeldesc_show(struct class_device *cdev, char *buf) 98lpfc_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);
908static CLASS_DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL); 917static CLASS_DEVICE_ATTR(max_xri, S_IRUGO, lpfc_max_xri_show, NULL);
909static CLASS_DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL); 918static CLASS_DEVICE_ATTR(used_xri, S_IRUGO, lpfc_used_xri_show, NULL);
910static CLASS_DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL); 919static CLASS_DEVICE_ATTR(npiv_info, S_IRUGO, lpfc_npiv_info_show, NULL);
920static CLASS_DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show,
921 NULL);
911 922
912 923
913static char *lpfc_soft_wwn_key = "C99G71SL8032A"; 924static 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,