Skip to content

Commit

Permalink
[SCSI] lpfc 8.1.4 : Two misc fixes
Browse files Browse the repository at this point in the history
Two misc fixes:
 - Fix deadlock caused by return with host_lock held in lpfc_findnode_did
 - Initialize all fields of the allocated mail box structure to zero.
   Was causing some sysfs mailbox commands to fail immediately after load.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
James Smart authored and James Bottomley committed Mar 12, 2006
1 parent 9290831 commit fc6c12b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/lpfc/lpfc_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count)
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
if (!mbox)
return -ENOMEM;

memset(mbox, 0, sizeof (LPFC_MBOXQ_t));
}

spin_lock_irq(host->host_lock);
Expand Down
2 changes: 2 additions & 0 deletions drivers/scsi/lpfc/lpfc_hbadisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did)
phba->brd_no,
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1);
spin_unlock_irq(phba->host->host_lock);
return ndlp;
}
}
Expand Down Expand Up @@ -1805,6 +1806,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did)
phba->brd_no,
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1);
spin_unlock_irq(phba->host->host_lock);
return ndlp;
}
}
Expand Down

0 comments on commit fc6c12b

Please sign in to comment.