Skip to content

Commit

Permalink
[SCSI] lpfc: don't free mempool if mailbox is busy
Browse files Browse the repository at this point in the history
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
James Smart authored and James Bottomley committed Sep 26, 2006
1 parent e8216de commit 8aee918
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)

lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed);
pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
if (lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT) != MBX_SUCCESS) {
rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT);
if (rc != MBX_SUCCESS) {
lpfc_printf_log(phba,
KERN_ERR,
LOG_INIT,
Expand All @@ -406,7 +407,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)
readl(phba->HAregaddr); /* flush */

phba->hba_state = LPFC_HBA_ERROR;
mempool_free(pmb, phba->mbox_mem_pool);
if (rc != MBX_BUSY)
mempool_free(pmb, phba->mbox_mem_pool);
return -EIO;
}
/* MBOX buffer will be freed in mbox compl */
Expand Down

0 comments on commit 8aee918

Please sign in to comment.