Commit 8aee918a authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc: don't free mempool if mailbox is busy

Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e8216dee
...@@ -389,7 +389,8 @@ lpfc_config_port_post(struct lpfc_hba * phba) ...@@ -389,7 +389,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)
lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed); lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed);
pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 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, lpfc_printf_log(phba,
KERN_ERR, KERN_ERR,
LOG_INIT, LOG_INIT,
...@@ -406,7 +407,8 @@ lpfc_config_port_post(struct lpfc_hba * phba) ...@@ -406,7 +407,8 @@ lpfc_config_port_post(struct lpfc_hba * phba)
readl(phba->HAregaddr); /* flush */ readl(phba->HAregaddr); /* flush */
phba->hba_state = LPFC_HBA_ERROR; 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; return -EIO;
} }
/* MBOX buffer will be freed in mbox compl */ /* MBOX buffer will be freed in mbox compl */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment