diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-10-27 13:38:11 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:33 -0500 |
commit | 7af670510df343db55752a2210dcf4fc09f59fbb (patch) | |
tree | 59baacb490afb7dcd955ad8daca734eae7d8cef8 /drivers/scsi/lpfc/lpfc_attr.c | |
parent | 76bb24efdc5de8eead0ccc07ec7e3b59a4ca0f15 (diff) |
[SCSI] lpfc 8.2.3 : Temperature handling fix
Temperature handling fix - return proper error code indicator for applications
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 4e9e890449a3..e1b041d8f6d5 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -979,6 +979,12 @@ lpfc_soft_wwpn_store(struct class_device *cdev, const char *buf, size_t count) | |||
979 | unsigned int i, j, cnt=count; | 979 | unsigned int i, j, cnt=count; |
980 | u8 wwpn[8]; | 980 | u8 wwpn[8]; |
981 | 981 | ||
982 | spin_lock_irq(&phba->hbalock); | ||
983 | if (phba->over_temp_state == HBA_OVER_TEMP) { | ||
984 | spin_unlock_irq(&phba->hbalock); | ||
985 | return -EPERM; | ||
986 | } | ||
987 | spin_unlock_irq(&phba->hbalock); | ||
982 | /* count may include a LF at end of string */ | 988 | /* count may include a LF at end of string */ |
983 | if (buf[cnt-1] == '\n') | 989 | if (buf[cnt-1] == '\n') |
984 | cnt--; | 990 | cnt--; |
@@ -1750,6 +1756,12 @@ sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr, | |||
1750 | 1756 | ||
1751 | spin_lock_irq(&phba->hbalock); | 1757 | spin_lock_irq(&phba->hbalock); |
1752 | 1758 | ||
1759 | if (phba->over_temp_state == HBA_OVER_TEMP) { | ||
1760 | sysfs_mbox_idle(phba); | ||
1761 | spin_unlock_irq(&phba->hbalock); | ||
1762 | return -EPERM; | ||
1763 | } | ||
1764 | |||
1753 | if (off == 0 && | 1765 | if (off == 0 && |
1754 | phba->sysfs_mbox.state == SMBOX_WRITING && | 1766 | phba->sysfs_mbox.state == SMBOX_WRITING && |
1755 | phba->sysfs_mbox.offset >= 2 * sizeof(uint32_t)) { | 1767 | phba->sysfs_mbox.offset >= 2 * sizeof(uint32_t)) { |