[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>
This commit is contained in:

committed by
James Bottomley

parent
76bb24efdc
commit
7af670510d
@@ -979,6 +979,12 @@ lpfc_soft_wwpn_store(struct class_device *cdev, const char *buf, size_t count)
|
||||
unsigned int i, j, cnt=count;
|
||||
u8 wwpn[8];
|
||||
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
if (phba->over_temp_state == HBA_OVER_TEMP) {
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
return -EPERM;
|
||||
}
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
/* count may include a LF at end of string */
|
||||
if (buf[cnt-1] == '\n')
|
||||
cnt--;
|
||||
@@ -1750,6 +1756,12 @@ sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
|
||||
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
|
||||
if (phba->over_temp_state == HBA_OVER_TEMP) {
|
||||
sysfs_mbox_idle(phba);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (off == 0 &&
|
||||
phba->sysfs_mbox.state == SMBOX_WRITING &&
|
||||
phba->sysfs_mbox.offset >= 2 * sizeof(uint32_t)) {
|
||||
|
Reference in New Issue
Block a user