summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-08-31 18:27:57 +0200
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-26 18:23:15 +0200
commit8aee918a1cff2a3722ce76fc6fa5abe09aa98d1b (patch)
treebec1aefd8598c3e840789661a54343e4ce803d59 /drivers/scsi/lpfc
parent[PATCH] s390: fix cmm kernel thread handling (diff)
downloadlinux-8aee918a1cff2a3722ce76fc6fa5abe09aa98d1b.tar.xz
linux-8aee918a1cff2a3722ce76fc6fa5abe09aa98d1b.zip
[SCSI] lpfc: don't free mempool if mailbox is busy
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 4cdf3464267f..a5723ad0a099 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -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,
@@ -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 */